list_vehicles
Retrieve all available vehicles for assignment to travel program activities through the LumbreTravel MCP Server API.
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)MCP tool handler for 'list_vehicles': fetches vehicles using ApiService and returns them as formatted JSON text response.case 'list_vehicles': { const vehicles = await this.apiService.getVehicles() return { content: [{ type: 'text', text: JSON.stringify(vehicles, null, 2) }] } }
- Tool schema definition including name, description, and empty input schema (no parameters required).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/index.ts:38-41 (registration)Registers the listTools request handler on the MCP server, which returns the list of available tools including 'list_vehicles'.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )
- src/services/api.service.ts:392-399 (helper)Supporting ApiService method that authenticates and makes a GET request to the backend API endpoint to list all 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:44-47 (registration)Registers the callTool request handler on the MCP server, which dispatches to the specific tool handler (including list_vehicles) based on name.this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )