openapi: 3.1.0
info:
  title: Taoticket Cruise Tools
  description: A set of tools to search for cruises and get detailed information about ships, provided by Taoticket.com.
  version: '1.0.0'
servers:
  # Make sure this is your final production domain
  - url: https://www.taoticket.com
paths:
  /mcp/tools/find-cruises:
    post:
      summary: Search for cruise itineraries and availability based on various criteria.
      description: Useful for finding specific cruises by port, company, geographic area, or period.
      operationId: findCruises
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                departure_port:
                  type: string
                  description: Name of the departure port (e.g., "Genoa").
                period:
                  type: string
                  description: Departure month and year (e.g., "september 2025").
                from_date:
                  type: string
                  description: Specific minimum departure date (YYYY-MM-DD format).
                to_date:
                  type: string
                  description: Specific maximum departure date (YYYY-MM-DD format).
                company:
                  type: string
                  description: Name of the cruise line/company (e.g., "Costa Cruises").
                ship:
                  type: string
                  description: Name of the ship.
                area:
                  type: string
                  description: Geographic area (e.g., "Mediterranean", "Caribbean").
                user_language:
                  type: string
                  description: "The language of the user's original query as a two-letter ISO 639-1 code (e.g., 'it', 'fr', 'en'). This influences the language of the generated URLs."
      responses:
        '200':
          description: The raw response from the executed tool.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolResponse'
  /mcp/tools/info-nave:
    post:
      summary: Retrieve technical data and information about a specific ship.
      operationId: getShipInfo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ship_name:
                  type: string
                  description: The exact name of the ship to search for (e.g., "Costa Smeralda").
      responses:
        '200':
          description: The raw response from the executed tool.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolResponse'
  /mcp/tools/cerca-faq:
    post:
      summary: Find answers to frequently asked questions about policies, payments, documents, etc.
      description: Use for general questions about how things work, not for searching for cruises.
      operationId: findFaq
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  description: The user's question to find an answer for.
      responses:
        '200':
          description: The raw response from the executed tool.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolResponse'

# Section that defines how security works and reusable schemas
components:
  schemas:
    ToolResponse:
      type: object
      properties:
        prompt:
          type: string
          description: The name of the tool that was executed.
        messages:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                description: The role of the message sender, usually 'assistant'.
              text:
                type: string
                description: The raw text output from the tool.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API-KEY
      description: "Enter your API Key in the Authorization header as 'Bearer [YOUR_KEY]'."

# Apply security to ALL endpoints defined above
security:
  - ApiKeyAuth: []
