update_agency
Update agency details including name, description, and provider information in the LumbreTravel MCP Server. Ensures accurate and current data for travel management.
Instructions
Actualizar una agencia
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Descripción de la agencia | |
| id | Yes | ID de la agencia a actualizar | |
| name | Yes | Nombre de la agencia | |
| provider | Yes |
Implementation Reference
- src/handlers/tools.handler.ts:1439-1445 (handler)Handler function that executes the 'update_agency' tool by calling the ApiService updateAgency method and returning the result.case 'update_agency': { const { id, name, description, provider } = args const agency = await this.apiService.updateAgency({ id, name, description, provider }) return { content: [{ type: 'text', text: JSON.stringify(agency, null, 2) }] } }
- Tool schema definition including input schema for 'update_agency' in the listTools method.{ name: 'update_agency', description: 'Actualizar una agencia', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID de la agencia a actualizar' }, name: { type: 'string', description: 'Nombre de la agencia' }, description: { type: 'string', description: 'Descripción de la agencia' }, provider: { type: 'object', properties: { id: { type: 'string', description: 'ID del proveedor de la agencia' }, name: { type: 'string', description: 'Nombre del proveedor de la agencia' } } } }, required: ['id', 'name', 'description', 'provider'] } },
- src/services/api.service.ts:445-460 (helper)ApiService method that performs the actual API call to update an agency.async updateAgency (data: { id: string name: string description: string provider: { id: string name: string } }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/agency/update`, { method: 'PUT', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response)
- src/index.ts:44-47 (registration)Registration of the callTool handler which dispatches to specific tool implementations based on name.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 handler which provides the tool list including 'update_agency'.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )