list_agencies
Retrieve all travel agencies available for association with a travel program using the LumbreTravel MCP Server.
Instructions
Obtiene todas las agencias disponibles para asociar a un programa de viajes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/tools.handler.ts:1227-1235 (handler)Handler logic for the 'list_agencies' tool. It calls apiService.getAgencies() and returns the JSON stringified result.case 'list_agencies': { const agencies = await this.apiService.getAgencies() return { content: [{ type: 'text', text: JSON.stringify(agencies, null, 2) }] } }
- Input schema definition and tool registration entry for 'list_agencies' in the listTools() method.name: 'list_agencies', description: 'Obtiene todas las agencias disponibles para asociar a un programa de viajes', inputSchema: { type: 'object', properties: {} } },
- src/services/api.service.ts:356-363 (helper)ApiService.getAgencies() method which performs the actual API call to retrieve the list of agencies.async getAgencies () { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/agencies`, { method: 'GET', headers }) return await this.handleResponse<any[]>(response) }
- src/index.ts:44-47 (registration)Server registration for CallToolRequestSchema, which routes to toolsHandler.callTool based on tool name.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 ListToolsRequestSchema, which provides the tool list including 'list_agencies' schema.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )