create_passengers
Add passenger details to travel bookings by processing names, birthdates, documents, and contact information for trip arrangements.
Instructions
Crea pasajeros, usa esta tool cuando el asistente recibe los datos de los pasajeros como parte del pedido del usuario
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| passengers | Yes |
Implementation Reference
- src/handlers/tools.handler.ts:1340-1349 (handler)MCP tool handler for 'create_passengers': extracts arguments, calls ApiService.createPassengers, formats and returns the response as text content.case 'create_passengers': { const { passengers, programId } = args as { passengers: any[], programId: string } const createdPassengers = await this.apiService.createPassengers(passengers, programId) return { content: [{ type: 'text', text: JSON.stringify(createdPassengers, null, 2) }] } }
- Input schema definition and registration of the 'create_passengers' tool in the listTools() method, including name, description, and detailed inputSchema for passengers array.{ name: 'create_passengers', description: 'Crea pasajeros, usa esta tool cuando el asistente recibe los datos de los pasajeros como parte del pedido del usuario', inputSchema: { type: 'object', properties: { passengers: { type: 'array', items: { type: 'object', properties: { firstname: { type: 'string' }, lastname: { type: 'string' }, birthdate: { type: 'string', description: "Fecha de nacimiento del pasajero (DD-MM-YYYY), si no se especifica usa el valor 'No conocemos'" }, documenttype: { type: 'string', description: 'Tipo de documento, opciones válidas son DNI, Pasaporte, Licencia de Conducir o ID. Si no se especifica el valor por defecto es ID.' }, document: { type: 'string', description: "Numero de documento, si no se especifica usa el valor 'No conocemos'" }, gender: { type: 'string', description: 'Género del pasajero, puede ser male, female,non_binary, prefer_not_to_say, other. Si no se especifica deducilo del nombre y apellido' }, nationality: { type: 'string', description: 'Nacionalidad del pasajero de acuerdo a ISO 3166-1. Si no se especifica deducilo del nombre y apellido' }, language: { type: 'string', description: "Idioma del pasajero de acuerdo a ISO 639-1. Si no se especifica deducilo del nombre y apellido. No intentes usar las tools 'list_service_languages' ni 'get_service_language_by_name' para obtener el idioma del pasajero. El idioma del pasajero es simplemente un string en formato ISO 639-1." }, email: { type: 'string', description: "Email del pasajero, si no se especifica usa el valor 'No conocemos'" }, phone: { type: 'string', description: "Telefono del pasajero, si no se especifica usa el valor 'No conocemos'" } }, required: ['firstname', 'lastname', 'birthdate', 'documenttype', 'document', 'gender', 'nationality', 'language', 'email', 'phone'] } } }, required: ['passengers'] } },
- src/services/api.service.ts:297-305 (helper)Helper method in ApiService that performs the actual HTTP POST request to the backend API endpoint /integrations/mcp/passengers/create_passengers to create passengers for a program.async createPassengers (passengers: any[], programId: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/passengers/create_passengers`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ passengers, programId }) }) return await this.handleResponse<any>(response) }
- src/index.ts:44-47 (registration)MCP server registration of the generic callTool handler, which dispatches to ToolsHandler.callTool based on tool name, enabling execution of 'create_passengers'.this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )