delete_vehicle
Remove a vehicle from the LumbreTravel MCP Server by specifying its unique ID. Simplifies vehicle management within travel programs and activities.
Instructions
Eliminar un vehículo.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID del vehículo a eliminar |
Implementation Reference
- src/handlers/tools.handler.ts:1607-1613 (handler)Executes the delete_vehicle tool by extracting the vehicle ID from arguments and calling the ApiService.deleteVehicle method, then returning the result as MCP content.case 'delete_vehicle': { const { id } = args as { id: string } const vehicle = await this.apiService.deleteVehicle(id) return { content: [{ type: 'text', text: JSON.stringify(vehicle, null, 2) }] } }
- Defines the input schema for the delete_vehicle tool, requiring a string 'id' parameter.{ name: 'delete_vehicle', description: 'Eliminar un vehículo.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del vehículo a eliminar' } }, required: ['id'] } },
- src/index.ts:38-41 (registration)Registers the listTools handler which includes the delete_vehicle tool in the MCP server's tool list.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )
- src/services/api.service.ts:837-844 (helper)Helper method in ApiService that performs the HTTP DELETE request to the backend API to delete a vehicle by ID.async deleteVehicle (id: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/vehicle/delete/${id}`, { method: 'DELETE', headers }) return await this.handleResponse<any>(response) }