get_provider_by_name
Retrieve provider details by name using the LumbreTravel MCP Server tool. Simplifies access to travel program and activity management through structured API integration.
Instructions
Buscar proveedores por su nombre
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre del proveedor |
Implementation Reference
- src/handlers/tools.handler.ts:1663-1669 (handler)Handler logic for the 'get_provider_by_name' MCP tool. Extracts 'name' from args, calls apiService.getProviderByName(name), and returns the JSON-stringified provider data.case 'get_provider_by_name': { const { name } = args as { name: string } const provider = await this.apiService.getProviderByName(name) return { content: [{ type: 'text', text: JSON.stringify(provider, null, 2) }] } }
- Input schema and metadata for the 'get_provider_by_name' tool, defining it takes a required 'name' string.name: 'get_provider_by_name', description: 'Buscar proveedores por su nombre', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del proveedor' } }, required: ['name'] } },
- src/handlers/tools.handler.ts:1053-1056 (registration)Registration of the 'get_provider_by_name' tool in the listTools() method, which MCP server uses to expose available tools.name: 'get_provider_by_name', description: 'Buscar proveedores por su nombre', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del proveedor' } }, required: ['name'] } },
- src/services/api.service.ts:660-668 (helper)Helper function in ApiService that performs the actual API call to retrieve providers by name from the backend endpoint.async getProviderByName (name: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/provider/get_providers_by_name`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ name }) }) return await this.handleResponse<any>(response) }