list_vehicles
Retrieve available vehicles to assign to travel program activities. This tool accesses the LumbreTravel API to display transport options for trip planning.
Instructions
Obtiene todos los vehículos disponibles para asociar a una actividad en un programa de viajes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/tools.handler.ts:1267-1275 (handler)Executes the list_vehicles tool by calling ApiService.getVehicles() and formatting the response as MCP content.case 'list_vehicles': { const vehicles = await this.apiService.getVehicles() return { content: [{ type: 'text', text: JSON.stringify(vehicles, null, 2) }] } }
- Input schema and metadata definition for the list_vehicles tool within the listTools() response.name: 'list_vehicles', description: 'Obtiene todos los vehículos disponibles para asociar a una actividad en un programa de viajes', inputSchema: { type: 'object', properties: {} } },
- src/services/api.service.ts:392-399 (helper)ApiService method that sends a GET request to the backend API endpoint to fetch all available vehicles.async getVehicles () { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/vehicles`, { method: 'GET', headers }) return await this.handleResponse<any[]>(response) }
- src/index.ts:36-48 (registration)Registers the MCP server request handlers for listing tools (listTools) and calling tools (callTool), enabling the list_vehicles tool.private setupHandlers (): void { // Configure handlers to list tools this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() ) // Configure handlers for tools this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) ) }