get_leader_by_name
Search for travel guides by their name to manage and organize travel programs or activities using the LumbreTravel MCP Server API.
Instructions
Buscar guías por su nombre.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre del guía |
Implementation Reference
- src/handlers/tools.handler.ts:1583-1589 (handler)The main handler function for the 'get_leader_by_name' tool. It extracts the 'name' parameter, calls the ApiService method getLeaderByName, and returns the result as a formatted JSON text response.case 'get_leader_by_name': { const { name } = args as { name: string } const leader = await this.apiService.getLeaderByName(name) return { content: [{ type: 'text', text: JSON.stringify(leader, null, 2) }] } }
- The tool definition including name, description, and input schema, returned by listTools() method for registration with the MCP server.{ name: 'get_leader_by_name', description: 'Buscar guías por su nombre.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del guía' } }, required: ['name'] } },
- src/services/api.service.ts:786-794 (helper)Supporting ApiService method that performs the actual HTTP POST request to the backend API endpoint /integrations/mcp/leader/get_leaders_by_name to fetch leaders by name.async getLeaderByName (name: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/leader/get_leaders_by_name`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ name }) }) return await this.handleResponse<any>(response) }
- src/index.ts:44-47 (registration)General registration of the callTool handler on the MCP server, which dispatches to the specific tool handler based on name.this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )