delete_passenger
Remove a passenger from travel records by specifying their unique ID to maintain accurate booking information.
Instructions
Elimina un pasajero teniendo en cuenta que se conoce su ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| passengerId | Yes |
Implementation Reference
- src/handlers/tools.handler.ts:1370-1376 (handler)Handler implementation for the 'delete_passenger' tool in the callTool method. Extracts passengerId from args, calls apiService.deletePassenger, and returns the JSON stringified result.case 'delete_passenger': { const { passengerId } = args as { passengerId: string } const deletedPassenger = await this.apiService.deletePassenger(passengerId) return { content: [{ type: 'text', text: JSON.stringify(deletedPassenger, null, 2) }] } }
- Schema definition and registration for the 'delete_passenger' tool within the listTools method, including name, description, and input schema requiring 'passengerId'.{ name: 'delete_passenger', description: 'Elimina un pasajero teniendo en cuenta que se conoce su ID', inputSchema: { type: 'object', properties: { passengerId: { type: 'string' } }, required: ['passengerId'] } },
- src/services/api.service.ts:327-334 (helper)Helper method in ApiService that performs the actual API call to delete a passenger by ID via DELETE request to /passengers/delete/{passengerId}, used by the tool handler.async deletePassenger (passengerId: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/passengers/delete/${passengerId}`, { method: 'DELETE', headers }) return await this.handleResponse<any>(response) }
- src/index.ts:44-47 (registration)Server registration for handling tool calls via CallToolRequestSchema, which routes to toolsHandler.callTool based on the tool name, enabling execution of 'delete_passenger'.this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )
- src/index.ts:38-41 (registration)Server registration for listing available tools via ListToolsRequestSchema, which includes the 'delete_passenger' tool from toolsHandler.listTools.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )