delete_leader
Remove a guide from the travel management system by specifying their unique identifier.
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)Handler execution logic for the 'delete_leader' tool. Extracts the leader ID from arguments, calls apiService.deleteLeader(id), and returns the JSON-stringified result as text content.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 for 'delete_leader', including name, description, and input schema requiring a string 'id'.{ 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-47 (registration)Registers the ToolsHandler's listTools and callTool methods with the MCP server for handling tool requests, effectively registering all tools including 'delete_leader'.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() ) // Configure handlers for tools this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )
- src/services/api.service.ts:767-774 (helper)Supporting API service method that performs the actual HTTP DELETE request to delete a leader by ID via the backend API.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) }