delete_service
Remove a travel service from the LumbreTravel system by providing its unique identifier to manage program offerings.
Instructions
Eliminar un servicio
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID del servicio a eliminar |
Implementation Reference
- src/handlers/tools.handler.ts:1527-1533 (handler)The handler logic for the 'delete_service' tool. It extracts the service ID from the input arguments and delegates the deletion to the ApiService.deleteService method, returning the result as a JSON-formatted text response.case 'delete_service': { const { id } = args as { id: string } const service = await this.apiService.deleteService(id) return { content: [{ type: 'text', text: JSON.stringify(service, null, 2) }] } }
- src/handlers/tools.handler.ts:1096-1100 (registration)Registration of the 'delete_service' tool in the listTools method, including its name, description, and input schema definition.{ name: 'delete_service', description: 'Eliminar un servicio', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del servicio a eliminar' } }, required: ['id'] } },
- src/services/api.service.ts:705-712 (helper)The ApiService method that implements the core logic by making a DELETE HTTP request to the backend API endpoint to delete the service by its ID.async deleteService (id: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/service/delete/${id}`, { method: 'DELETE', headers }) return await this.handleResponse<any>(response) }