delete_leader
Remove a guide by specifying their unique ID to manage travel programs and activities effectively within the LumbreTravel MCP Server.
Instructions
Eliminar un guía
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID del guía a eliminar |
Implementation Reference
- src/handlers/tools.handler.ts:1567-1573 (handler)The execution handler for the 'delete_leader' tool. It extracts the leader ID from arguments, calls ApiService.deleteLeader(id), and returns the result as a text content response.case 'delete_leader': { const { id } = args as { id: string } const leader = await this.apiService.deleteLeader(id) return { content: [{ type: 'text', text: JSON.stringify(leader, null, 2) }] } }
- Tool schema definition including name, description, and input schema requiring a string 'id' for the leader to delete.{ name: 'delete_leader', description: 'Eliminar un guía', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del guía a eliminar' } }, required: ['id'] } },
- src/index.ts:38-41 (registration)Registers the listTools handler on the MCP server, which includes the 'delete_leader' tool in its returned list.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )
- src/services/api.service.ts:767-774 (helper)ApiService helper method that sends a DELETE request to the backend API to delete a leader by ID.async deleteLeader (id: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/leader/delete/${id}`, { method: 'DELETE', headers }) return await this.handleResponse<any>(response) }
- src/index.ts:43-47 (registration)Registers the callTool handler on the MCP server, which handles execution of 'delete_leader' when called.// Configure handlers for tools this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )