Skip to main content
Glama
lumile

LumbreTravel MCP Server

by lumile

update_activities

Update multiple activities within a travel program by modifying dates, passengers, services, hotels, guides, vehicles, and other details.

Instructions

Actualizar múltiples actividades asociadas a un programa

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
programIdYesID del programa
activitiesYesLista de actividades a actualizar

Implementation Reference

  • The core handler logic for the 'update_activities' MCP tool. It processes input arguments, formats dates using formatDate utility, calls ApiService.updateActivities, and returns a success message with updated program details.
    case 'update_activities': {
      const { programId, activities } = args
      activities.forEach((activity: any) => {
        activity.date = formatDate(activity.date)
      })
      const program = await this.apiService.updateActivities({ programId, activities })
      return {
        content: [{
          type: 'text',
          text: `Actividades actualizadas exitosamente al programa.\n\nDetalles del programa actualizado:\n${JSON.stringify(program, null, 2)}`
        }]
      }
    }
  • Input schema definition and description for the 'update_activities' tool, listed in the listTools() response.
      name: 'update_activities',
      description: 'Actualizar múltiples actividades asociadas a un programa',
      inputSchema: {
        type: 'object',
        properties: {
          programId: {
            type: 'string',
            description: 'ID del programa'
          },
          activities: {
            type: 'array',
            description: 'Lista de actividades a actualizar',
            items: {
              type: 'object',
              properties: {
                activityId: {
                  type: 'string',
                  description: 'ID de la actividad a actualizar, es importante que la actividad ya exista'
                },
                primaryPassenger: {
                  type: 'string',
                  description: 'ID del pasajero principal, si no se especifica se mantiene el pasajero principal actual.  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 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 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 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 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 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 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']
      }
    },
  • src/index.ts:38-47 (registration)
    Registers the general tool handlers on the MCP server: listTools for tool list/schemas (including update_activities) and callTool for executing tools like update_activities.
    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)
    )
  • ApiService.updateActivities method: sends POST request to backend API endpoint to update activities for a program, handles auth and response.
    async updateActivities (data: {
      programId: string
      activities: Array<{
        activityId: string
        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/update`, {
        method: 'POST',
        headers: { ...headers, 'Content-Type': 'application/json' },
        body: JSON.stringify(data)
      })
      return await this.handleResponse<any>(response)
    }
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 states 'Actualizar' (update), implying a mutation, but doesn't specify permissions needed, whether updates are reversible, rate limits, or error handling. The description is too brief to cover these critical aspects for a mutation tool.

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

Conciseness5/5

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

The description is a single, efficient sentence in Spanish that directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized for the complexity, with zero waste.

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?

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what 'update' entails (e.g., partial vs. full updates), success criteria, or return values. Given the complexity of updating multiple activities with nested objects, more context is needed to guide the agent effectively.

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?

Schema description coverage is 100%, so the input schema already documents all parameters thoroughly. The description adds no additional semantic meaning beyond what's in the schema, such as explaining relationships between parameters or usage patterns. Baseline 3 is appropriate when the schema does the heavy lifting.

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 action ('Actualizar' meaning 'Update') and resource ('múltiples actividades asociadas a un programa'), which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'update_program' or 'update_agency', which could also involve updating related entities, though the focus on 'activities' is clear.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'add_activities' or 'delete_activities'. It lacks context about prerequisites (e.g., activities must exist) or scenarios where this tool is appropriate, leaving the agent to infer usage from the tool name alone.

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