create_vehicle
Add a vehicle to the LumbreTravel system by specifying its name, description, brand, model, capacity, and provider details for travel program management.
Instructions
Crear un vehículo.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre del vehículo | |
| description | Yes | Descripción del vehículo | |
| brand | No | Marca del vehículo | |
| model | No | Modelo del vehículo | |
| capacity | No | Capacidad del vehículo | |
| provider | Yes |
Implementation Reference
- src/handlers/tools.handler.ts:1591-1596 (handler)MCP tool handler case that destructures arguments and calls apiService.createVehicle to execute the tool logic, returning the JSON-stringified result.case 'create_vehicle': { const { name, description, brand, model, capacity, provider } = args const vehicle = await this.apiService.createVehicle({ name, description, brand, model, capacity, provider }) return { content: [{ type: 'text', text: JSON.stringify(vehicle, null, 2) }] }
- Tool definition including name, description, and input schema for validation in listTools().name: 'create_vehicle', description: 'Crear un vehículo.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del vehículo' }, description: { type: 'string', description: 'Descripción del vehículo' }, brand: { type: 'string', description: 'Marca del vehículo' }, model: { type: 'string', description: 'Modelo del vehículo' }, capacity: { type: 'number', description: 'Capacidad del vehículo' }, provider: { type: 'object', properties: { id: { type: 'string', description: 'ID del proveedor del vehículo.' }, name: { type: 'string', description: 'Nombre del proveedor del vehículo' } } } }, required: ['name', 'description', 'provider'] } },
- src/services/api.service.ts:796-814 (helper)Underlying service method that performs the HTTP POST request to the LumbreTravel API endpoint for creating a vehicle.async createVehicle (data: { name: string description: string brand: string model: string capacity: number provider: { id: string name: string } }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/vehicle/create`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response) }