update_leader
Modify guide details like name, contact information, and language preferences in the LumbreTravel travel management system.
Instructions
Actualizar un guía
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID del guía a actualizar | |
| name | Yes | Nombre del guía | |
| description | Yes | Descripción del guía | |
| phone | Yes | Teléfono del guía | |
| language | Yes | Idioma del guía de acuerdo a ISO 639-1. NO intentes usar 'list_service_languages' ni 'get_service_language_by_name' para obtener el idioma del guía. | |
| Yes | Email del guía |
Implementation Reference
- src/handlers/tools.handler.ts:1559-1564 (handler)Handler function that implements the 'update_leader' MCP tool by destructuring arguments and calling the ApiService.updateLeader method, then returning the JSON-stringified result.case 'update_leader': { const { id, name, description, phone, email, language } = args const leader = await this.apiService.updateLeader({ id, name, description, phone, email, language }) return { content: [{ type: 'text', text: JSON.stringify(leader, null, 2) }] }
- Input schema definition for the 'update_leader' tool, specifying required parameters and descriptions.name: 'update_leader', description: 'Actualizar un guía', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del guía a actualizar' }, name: { type: 'string', description: 'Nombre del guía' }, description: { type: 'string', description: 'Descripción del guía' }, phone: { type: 'string', description: 'Teléfono del guía' }, language: { type: 'string', description: "Idioma del guía de acuerdo a ISO 639-1. NO intentes usar 'list_service_languages' ni 'get_service_language_by_name' para obtener el idioma del guía." }, email: { type: 'string', description: 'Email del guía' } }, required: ['id', 'name', 'description', 'phone', 'email', 'language'] } },
- src/index.ts:44-47 (registration)Registration of the callTool request handler on the MCP server, which dispatches to ToolsHandler.callTool based on the tool name, enabling execution of 'update_leader'.this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )
- src/index.ts:38-41 (registration)Registration of the listTools request handler on the MCP server, which returns the list including 'update_leader' tool definition.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )
- src/services/api.service.ts:750-764 (helper)ApiService method that performs the actual HTTP PUT request to update a leader via the backend API, used by the tool handler.async updateLeader (data: { id: string name: string description: string phone: string email: string language: string }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/leader/update`, { method: 'PUT', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response)