update_agency
Modify travel agency details including name, description, and provider information within the LumbreTravel system to maintain accurate program data.
Instructions
Actualizar una agencia
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID de la agencia a actualizar | |
| name | Yes | Nombre de la agencia | |
| description | Yes | Descripción de la agencia | |
| provider | Yes |
Implementation Reference
- src/handlers/tools.handler.ts:1439-1445 (handler)Handler logic in callTool method that processes arguments and invokes the ApiService updateAgency method, returning the result as MCP content.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 definition including name, description, and input schema for validation in listTools().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 HTTP PUT request to update an agency using authenticated headers and error handling.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)