Skip to main content
Glama
lumile

LumbreTravel MCP Server

by lumile

create_program

Generate custom travel programs by specifying the name, start and end dates, and associated agency ID. Ensures clarity by prompting users for missing details before creation.

Instructions

Crea un nuevo programa de viajes. Antes de crear un nuevo programa se debe preguntar al si quiere que primero se busque el programa a ver si existe. Si no se especifica la fecha de inicio o fin del programa, no la asumas, pide al usuario que la especifique. Si no se especifica el ID de la agencia, pide al usuario que la especifique.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agencyIdYesID de la agencia a asociar con este programa
endDateYesFecha de fin del programa (DD-MM-YYYY), salvo que el usuario lo indique las fechas siempre deben ser en el futuro. Y la fecha de fin debe ser mayor que la fecha de inicio
nameYesNombre del programa
startDateYesFecha de inicio del programa (DD-MM-YYYY), salvo que el usuario lo indique las fechas siempre deben ser en el futuro

Implementation Reference

  • The main handler function for the 'create_program' MCP tool. It extracts arguments, formats dates, calls the ApiService.createProgram method, and returns the result in MCP format.
    case 'create_program': { const { name, startDate, endDate, agencyId } = args const program = await this.apiService.createProgram({ name, startDate: formatDate(startDate), endDate: formatDate(endDate), agency: { id: agencyId } }) return { content: [{ type: 'text', text: `Programa "${name}" creado exitosamente.\n\nDetalles del programa:\n${JSON.stringify(program, null, 2)}` }] } }
  • The input schema and metadata definition for the 'create_program' tool, returned by listTools() method.
    name: 'create_program', description: 'Crea un nuevo programa de viajes. Antes de crear un nuevo programa se debe preguntar al si quiere que primero se busque el programa a ver si existe. Si no se especifica la fecha de inicio o fin del programa, no la asumas, pide al usuario que la especifique. Si no se especifica el ID de la agencia, pide al usuario que la especifique.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del programa' }, startDate: { type: 'string', description: 'Fecha de inicio del programa (DD-MM-YYYY), salvo que el usuario lo indique las fechas siempre deben ser en el futuro' }, endDate: { type: 'string', description: 'Fecha de fin del programa (DD-MM-YYYY), salvo que el usuario lo indique las fechas siempre deben ser en el futuro. Y la fecha de fin debe ser mayor que la fecha de inicio' }, agencyId: { type: 'string', description: 'ID de la agencia a asociar con este programa' } }, required: ['name', 'startDate', 'endDate', 'agencyId'] } },
  • src/index.ts:44-47 (registration)
    Registration of the general callTool handler which dispatches to the specific tool implementation based on name.
    this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )
  • Helper method in ApiService that performs the actual HTTP POST request to the backend API to create the program.
    async createProgram (data: { name: string startDate: string endDate: string agency: { id: string } }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/programs/create`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response) }
  • src/index.ts:38-41 (registration)
    Registration of the listTools handler which includes the 'create_program' tool in its response.
    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