delete_agency
Remove an agency from the LumbreTravel MCP Server by its ID. The deleted agency cannot be used to assign programs or activities.
Instructions
Eliminar una agencia. La agencia eliminada no se puede usar para asociarle programas
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID de la agencia a eliminar |
Implementation Reference
- src/handlers/tools.handler.ts:1447-1453 (handler)The main handler logic for the 'delete_agency' MCP tool. It extracts the agency ID from arguments, calls the ApiService.deleteAgency method, and returns a formatted text response with the result.case 'delete_agency': { const { id } = args as { id: string } const agency = await this.apiService.deleteAgency(id) return { content: [{ type: 'text', text: JSON.stringify(agency, null, 2) }] } }
- The input schema definition for the 'delete_agency' tool, specifying the required 'id' parameter.{ name: 'delete_agency', description: 'Eliminar una agencia. La agencia eliminada no se puede usar para asociarle programas', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID de la agencia a eliminar' } }, required: ['id'] } },
- src/services/api.service.ts:463-470 (helper)Supporting API service method that sends the DELETE HTTP request to the backend API to delete the agency by ID.async deleteAgency (id: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/agency/delete/${id}`, { method: 'DELETE', headers }) return await this.handleResponse<any>(response) }
- src/index.ts:44-47 (registration)Registers the general callTool handler which dispatches to the specific tool handler based on name, including 'delete_agency'.this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )