Skip to main content
Glama
variflight
by variflight

getFlightTransferInfo

Retrieve flight transfer details using departure and arrival airport codes (IATA format) and the departure date in YYYY-MM-DD format. Ideal for planning connected flights or identifying transfer options for specific travel dates.

Instructions

Get flight transfer info by departure city and arrival city and departure date. Date format: YYYY-MM-DD. IMPORTANT: For today's date, you MUST use getTodayDate tool instead of hardcoding any date. Airport codes should be IATA 3-letter codes.

Input Schema

NameRequiredDescriptionDefault
arrcityYesArrival airport IATA 3-letter code (e.g. SHA for Shanghai, LAX for Los Angeles)
depcityYesDeparture airport IATA 3-letter code (e.g. BJS for Beijing, CAN for Guangzhou)
depdateYesFlight date in YYYY-MM-DD format. IMPORTANT: If user input only cotains month and date, you should use getTodayDate tool to get the year. For today's date, use getTodayDate tool instead of hardcoding

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "arrcity": { "description": "Arrival airport IATA 3-letter code (e.g. SHA for Shanghai, LAX for Los Angeles)", "maxLength": 3, "minLength": 3, "pattern": "^[A-Z]{3}$", "type": "string" }, "depcity": { "description": "Departure airport IATA 3-letter code (e.g. BJS for Beijing, CAN for Guangzhou)", "maxLength": 3, "minLength": 3, "pattern": "^[A-Z]{3}$", "type": "string" }, "depdate": { "description": "Flight date in YYYY-MM-DD format. IMPORTANT: If user input only cotains month and date, you should use getTodayDate tool to get the year. For today's date, use getTodayDate tool instead of hardcoding", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "type": "string" } }, "required": [ "depdate", "depcity", "arrcity" ], "type": "object" }

Implementation Reference

  • Core implementation of getFlightTransferInfo: calls makeRequest API with 'transfer' endpoint using depcity, arrcity, depdate.
    async getFlightTransferInfo(depcity, arrcity, depdate) { return this.makeRequest('transfer', { depcity, arrcity, depdate }); }
  • dist/index.js:96-127 (registration)
    MCP tool registration for 'getFlightTransferInfo', including description, Zod input schema, and wrapper handler that delegates to OpenAlService and formats JSON response.
    server.tool("getFlightTransferInfo", "Get flight transfer info by departure city and arrival city and departure date. Date format: YYYY-MM-DD. IMPORTANT: For today's date, you MUST use getTodayDate tool instead of hardcoding any date. Airport codes should be IATA 3-letter codes. ", { depdate: z.string() .regex(/^\d{4}-\d{2}-\d{2}$/) .describe("Flight date in YYYY-MM-DD format. IMPORTANT: If user input only cotains month and date, you should use getTodayDate tool to get the year. For today's date, use getTodayDate tool instead of hardcoding"), depcity: z.string() .length(3) .regex(/^[A-Z]{3}$/) .describe("Departure airport IATA 3-letter code (e.g. BJS for Beijing, CAN for Guangzhou)"), arrcity: z.string() .length(3) .regex(/^[A-Z]{3}$/) .describe("Arrival airport IATA 3-letter code (e.g. SHA for Shanghai, LAX for Los Angeles)"), }, async ({ depcity, arrcity, depdate }) => { try { const flights = await flightService.getFlightTransferInfo(depcity, arrcity, depdate); return { content: [ { type: "text", text: JSON.stringify(flights, null, 2) } ] }; } catch (error) { console.error('Error searching flights by number:', error); return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true }; } });
  • TypeScript declaration/signature for the getFlightTransferInfo method in OpenAlService.
    getFlightTransferInfo(depcity: string, arrcity: string, depdate: string): Promise<any>;

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/variflight/variflight-mcp'

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