Skip to main content
Glama
lumile

LumbreTravel MCP Server

by lumile

add_activities

Add activities to travel programs by specifying dates, times, services, hotels, guides, vehicles, and passengers. Ensures all referenced entities exist before creation.

Instructions

Crea actividades asociadas a un programa. Es importante que los servicios, hoteles, guías, vehículos y extras ya existan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
programIdYesID del programa
activitiesYesLista de actividades a agregar

Implementation Reference

  • Handler implementation for the 'add_activities' tool. It processes input arguments, formats dates using formatDate utility, calls the ApiService.addActivities method, and returns a formatted success response.
    case 'add_activities': {
      const { programId, activities } = args
      activities.forEach((activity: any) => {
        activity.date = formatDate(activity.date)
      })
      const program = await this.apiService.addActivities({ programId, activities })
    
      return {
        content: [{
          type: 'text',
          text: `Actividades agregadas exitosamente al programa.\n\nDetalles del programa actualizado:\n${JSON.stringify(program, null, 2)}`
        }]
      }
    }
  • Tool schema definition including name, description, and detailed inputSchema for validating 'add_activities' tool parameters.
    {
      name: 'add_activities',
      description: 'Crea actividades asociadas a un programa.  Es importante que los servicios, hoteles, guías, vehículos y extras ya existan',
      inputSchema: {
        type: 'object',
        properties: {
          programId: {
            type: 'string',
            description: 'ID del programa'
          },
          activities: {
            type: 'array',
            description: 'Lista de actividades a agregar',
            items: {
              type: 'object',
              properties: {
                primaryPassenger: {
                  type: 'string',
                  description: 'ID del pasajero principal, si no se especifica se asume que el primer pasajero es el principal.  Siempre se debe especificar el pasajero principal.'
                },
                passengers: {
                  type: 'array',
                  description: 'Lista de pasajeros a asociar a la actividad, es importante que los pasajeros ya existan',
                  items: {
                    type: 'object',
                    properties: {
                      id: { type: 'string' },
                      name: { type: 'string' }
                    },
                    required: ['id', 'name']
                  }
                },
                date: {
                  type: 'string',
                  description: 'Fecha de la actividad (DD-MM-YYYY), debe ser una fecha entre la fecha de inicio y fin del programa'
                },
                hour: {
                  type: 'string',
                  description: 'Hora de la actividad (HH:mm)'
                },
                service: {
                  type: 'object',
                  description: 'Servicio a asociar a la actividad, es importante que el servicio ya exista',
                  properties: {
                    id: { type: 'string' },
                    name: { type: 'string' }
                  },
                  required: ['id', 'name']
                },
                hotel: {
                  type: 'object',
                  description: 'Hotel a asociar a la actividad, es importante que el hotel ya exista',
                  properties: {
                    id: { type: 'string' },
                    name: { type: 'string' }
                  },
                  required: ['id', 'name']
                },
                leader: {
                  type: 'object',
                  description: 'Guía a asociar a la actividad, es importante que el guía ya exista',
                  properties: {
                    id: { type: 'string' },
                    name: { type: 'string' }
                  },
                  required: ['id', 'name']
                },
                vehicle: {
                  type: 'object',
                  description: 'Vehículo a asociar a la actividad, es importante que el vehículo ya exista',
                  properties: {
                    id: { type: 'string' },
                    name: { type: 'string' }
                  },
                  required: ['id', 'name']
                },
                includes: {
                  type: 'array',
                  description: 'Lista de extras o incluídos a asociar a la actividad, es importante que los extras ya existan',
                  items: {
                    type: 'object',
                    properties: {
                      id: { type: 'string' },
                      name: { type: 'string' }
                    }
                  }
                },
                servicelanguage: {
                  type: 'object',
                  description: 'Idioma en el que se va a prestar el servicio, si no se especifica se mantiene el idioma actual. Es importante que el idioma ya exista',
                  properties: {
                    id: { type: 'string' },
                    name: { type: 'string' }
                  },
                  required: ['id', 'name']
                },
                code: {
                  type: 'string',
                  description: 'Código de la actividad'
                },
                itinerary: {
                  type: 'string',
                  description: 'Itinerario de la actividad'
                },
                news: {
                  type: 'string',
                  description: 'Noticias de la actividad'
                }
              },
              required: ['date', 'hour', 'primaryPassenger']
            }
          }
        },
        required: ['programId', 'activities']
      }
  • Helper method in ApiService that makes the HTTP POST request to the backend API endpoint to add activities to a program.
    async addActivities (data: {
      programId: string
      activities: Array<{
        date: string
        hour: string
        service?: {
          id: string
          name: string
        }
        hotel?: {
          id: string
          name: string
        }
        leader?: {
          id: string
          name: string
        }
        vehicle?: {
          id: string
          name: string
        }
        primaryPassenger: string
        passengers: Array<{
          id: string
          name: string
        }>
        includes?: Array<{
          id: string
          name: string
        }>
        servicelanguage?: {
          id: string
          name: string
        }
        code?: string
        itinerary?: string
        news?: string
      }>
    }) {
      const headers = await this.getHeaders()
      const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/programs/activity/add`, {
        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 tool handlers on the MCP server: listTools for tool schemas and callTool for executing tools like 'add_activities'.
    this.server.setRequestHandler(
      ListToolsRequestSchema,
      async () => this.toolsHandler.listTools()
    )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that referenced entities must already exist, which is useful context, but doesn't cover critical aspects like whether this is a write operation (implied by 'Crea'), what happens on success/failure, error conditions, or any rate limits. For a creation tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point. It's appropriately sized for its purpose, though it could potentially be more structured by separating the core action from the prerequisites.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the tool (creating activities with multiple nested objects), no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, error handling, or the full behavioral context needed for a creation operation. The prerequisite note helps but doesn't compensate for the missing information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. According to the rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Crea' - creates) and resource ('actividades asociadas a un programa' - activities associated with a program), providing a specific purpose. However, it doesn't explicitly differentiate from sibling tools like 'update_activities' or 'daily_activities' beyond the creation aspect.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidance by stating that services, hotels, guides, vehicles, and extras must already exist, which suggests prerequisites. However, it doesn't explicitly state when to use this tool versus alternatives like 'create_program' or 'update_activities', nor does it mention exclusions or specific contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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