Skip to main content
Glama
ravinahp

Find Flights MCP Server

by ravinahp

get_offer_details

Retrieve comprehensive details about a specific flight offer to facilitate informed travel decisions, using the unique offer ID for accurate results.

Instructions

Get detailed information about a specific flight offer.

Input Schema

NameRequiredDescriptionDefault
paramsYes

Input Schema (JSON Schema)

{ "$defs": { "OfferDetails": { "description": "Model for getting detailed offer information.", "properties": { "offer_id": { "description": "The ID of the offer to get details for", "title": "Offer Id", "type": "string" } }, "required": [ "offer_id" ], "title": "OfferDetails", "type": "object" } }, "properties": { "params": { "$ref": "#/$defs/OfferDetails" } }, "required": [ "params" ], "title": "get_offer_detailsArguments", "type": "object" }

Implementation Reference

  • The handler function for the 'get_offer_details' tool, decorated with @mcp.tool() for registration. It retrieves detailed offer information using the Duffel API client and returns formatted JSON.
    async def get_offer_details(params: OfferDetails) -> str: """Get detailed information about a specific flight offer.""" try: async with flight_client as client: response = await client.get_offer( offer_id=params.offer_id ) return json.dumps(response, indent=2) except Exception as e: logger.error(f"Error getting offer details: {str(e)}", exc_info=True) raise
  • Pydantic model defining the input schema for the get_offer_details tool, consisting of a single required offer_id field.
    class OfferDetails(BaseModel): """Model for getting detailed offer information.""" offer_id: str = Field(..., description="The ID of the offer to get details for")
  • Import of the FastMCP server instance from services.search.py, which loads and registers the tool handlers via their decorators.
    from .services.search import mcp

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ravinahp/flights-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server