Skip to main content
Glama
lumile

LumbreTravel MCP Server

by lumile

create_vehicle

Generate and manage vehicles within LumbreTravel MCP Server by providing details like name, description, brand, model, capacity, and provider.

Instructions

Crear un vehículo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brandNoMarca del vehículo
capacityNoCapacidad del vehículo
descriptionYesDescripción del vehículo
modelNoModelo del vehículo
nameYesNombre del vehículo
providerYes

Implementation Reference

  • Handler implementation for the 'create_vehicle' tool in the callTool method of ToolsHandler class. It destructures the input arguments and delegates to ApiService.createVehicle, then returns the result as MCP content.
    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 schema definition including inputSchema for 'create_vehicle' in the listTools method.
    { 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'] }
  • ApiService method that makes the HTTP POST request to the backend API to create 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) }
  • src/index.ts:43-47 (registration)
    Registration of the generic callTool handler for all tools, including 'create_vehicle', in the MCP server setup.
    // Configure handlers for tools this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )
  • src/index.ts:38-41 (registration)
    Registration of the listTools handler which includes the 'create_vehicle' tool definition.
    this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lumile/lumbretravel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server