delete_program
Remove a travel program from the LumbreTravel system by specifying its unique identifier. This action permanently deletes the selected program and its associated data.
Instructions
Elimina un programa de viajes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/handlers/tools.handler.ts:1211-1217 (handler)The execution handler for the 'delete_program' tool. It extracts the program ID from arguments, calls ApiService.deleteProgram(id), and returns the JSON-stringified response.case 'delete_program': { const { id } = args as { id: string } const program = await this.apiService.deleteProgram(id) return { content: [{ type: 'text', text: JSON.stringify(program, null, 2) }] } }
- The input schema and metadata definition for the 'delete_program' tool, requiring a string 'id'.{ name: 'delete_program', description: 'Elimina un programa de viajes', inputSchema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] } },
- src/index.ts:37-49 (registration)Registers the tool handlers on the MCP server by setting request handlers for listing tools (via ToolsHandler.listTools) and calling tools (via ToolsHandler.callTool). This indirectly registers 'delete_program'.// Configure handlers to list tools 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:137-144 (helper)Helper method in ApiService that performs the HTTP DELETE request to the backend API to delete a program by ID.async deleteProgram (id: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/programs/delete/${id}`, { method: 'DELETE', headers }) return await this.handleResponse<any>(response) }