Skip to main content
Glama
lumile

LumbreTravel MCP Server

by lumile

create_service

Add new travel services to the LumbreTravel platform by specifying service name, description, and provider details for program management.

Instructions

Crear un servicio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNombre del servicio
descriptionYesDescripción del servicio
providerYes

Implementation Reference

  • Handler implementation for the 'create_service' tool. It destructures the input arguments (name, description, provider), calls ApiService.createService, and returns the created service as JSON text.
    case 'create_service': { const { name, description, provider } = args const service = await this.apiService.createService({ name, description, provider }) return { content: [{ type: 'text', text: JSON.stringify(service, null, 2) }] } }
  • Input schema and metadata definition for the 'create_service' tool, returned by listTools().
    name: 'create_service', description: 'Crear un servicio', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del servicio' }, description: { type: 'string', description: 'Descripción del servicio' }, provider: { type: 'object', properties: { id: { type: 'string', description: 'ID del proveedor' }, name: { type: 'string', description: 'Nombre del proveedor' } } } }, required: ['name', 'description', 'provider'] } },
  • ApiService.createService method that performs the HTTP POST request to the backend API endpoint to create a new service.
    async createService (data: { name: string description: string provider: { id: string name: string } }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/service/create`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response)
  • src/index.ts:38-47 (registration)
    MCP server request handlers for listing tools (which includes 'create_service') and calling tools (dispatches to ToolsHandler based on name).
    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) )
  • Import of ApiService used by the tools handler.
    import { ApiService } from '../services/api.service.js' import { formatDate } from '../utils/date.utils.js' import { type Server } from '@modelcontextprotocol/sdk/server/index.js' export class ToolsHandler { private readonly apiService: ApiService constructor () { this.apiService = new ApiService() }

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