get_program
Retrieve a travel program by its ID to access itinerary details, activities, and management information from the LumbreTravel API.
Instructions
Obtiene un programa de viajes por ID
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "get_program"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID del programa |
Implementation Reference
- src/handlers/tools.handler.ts:1118-1127 (handler)The handler logic for the 'get_program' tool within the callTool switch statement. Extracts the 'id' from arguments, calls apiService.getProgram(id), and returns the program data as formatted JSON text content.
case 'get_program': { const { id } = args as { id: string } const program = await this.apiService.getProgram(id) return { content: [{ type: 'text', text: JSON.stringify(program, null, 2) }] } } - src/handlers/tools.handler.ts:16-29 (schema)The tool definition including name, description, and input schema requiring a string 'id' for get_program.
{ name: 'get_program', description: 'Obtiene un programa de viajes por ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del programa' } }, required: ['id'] } }, - src/services/api.service.ts:84-91 (helper)The supporting API service method that fetches the program data by ID from the backend API endpoint /integrations/mcp/programs/get/{id}.
async getProgram (id: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/programs/get/${id}`, { method: 'GET', headers }) return await this.handleResponse<any>(response) } - src/index.ts:38-47 (registration)Registers the MCP request handlers for listing tools (listTools) and calling tools (callTool), which includes the get_program tool.
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) )