get_agency_by_name
Retrieve travel agency details by specifying the agency name using the LumbreTravel MCP Server for efficient API access and management of travel-related entities.
Instructions
Obtener una agencia por nombre, retorna la agencia encontrada.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre de la agencia |
Implementation Reference
- src/services/api.service.ts:482-490 (handler)The core handler function that performs the HTTP POST request to the backend API to retrieve the agency by name.async getAgencyByName (name: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/agency/get_agencies_by_name`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ name }) }) return await this.handleResponse<any>(response) }
- src/handlers/tools.handler.ts:1463-1469 (handler)The MCP tool call handler that extracts arguments, invokes the service method, and returns the JSON-formatted response.case 'get_agency_by_name': { const { name } = args as { name: string } const agency = await this.apiService.getAgencyByName(name) return { content: [{ type: 'text', text: JSON.stringify(agency, null, 2) }] } }
- The input schema defining the required 'name' parameter as a string for the tool.type: 'object', properties: { name: { type: 'string', description: 'Nombre de la agencia' } }, required: ['name'] }
- src/handlers/tools.handler.ts:753-760 (registration)The tool registration in listTools(), including name, description, and input schema.name: 'get_agency_by_name', description: 'Obtener una agencia por nombre, retorna la agencia encontrada.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre de la agencia' } }, required: ['name'] } },