get_services_by_name
Search and retrieve a list of services by their name from LumbreTravel MCP Server, enabling efficient access to travel-related programs and activities.
Instructions
Buscar servicios por su nombre, retorna la lista de servicios encontrados.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre del servicio |
Implementation Reference
- src/handlers/tools.handler.ts:1543-1549 (handler)The handler function for the 'get_services_by_name' tool. It extracts the 'name' parameter from args, calls apiService.getServicesByName(name), and returns the result as a JSON-formatted text content block.case 'get_services_by_name': { const { name } = args as { name: string } const service = await this.apiService.getServicesByName(name) return { content: [{ type: 'text', text: JSON.stringify(service, null, 2) }] } }
- The schema definition and registration for the 'get_services_by_name' tool in the listTools() method, including name, description, and inputSchema requiring a 'name' string.name: 'get_services_by_name', description: 'Buscar servicios por su nombre, retorna la lista de servicios encontrados.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del servicio' } }, required: ['name'] }
- src/services/api.service.ts:724-732 (helper)The supporting service method getServicesByName that performs a POST request to the backend API endpoint /integrations/mcp/service/get_services_by_name with the service name, handling authentication headers and response.async getServicesByName (name: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/service/get_services_by_name`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ name }) }) return await this.handleResponse<any>(response) }