season_summary
Generate passenger summaries for travel seasons to analyze distribution across agencies and calculate total passenger counts.
Instructions
Obtiene un resumen de pasajeros a lo largo de una temporada. Esta tool es muy útil para obtener el total de pasajeros de una temporada y ver como se distribuye por agencias.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| startYear | Yes | Año de inicio de la temporada (YYYY) | |
| endYear | Yes | Año de fin de la temporada (YYYY) |
Implementation Reference
- src/handlers/tools.handler.ts:1162-1168 (handler)Handler implementation for the 'season_summary' tool in the callTool method. Extracts parameters and delegates to ApiService.getSeasonSummary, returning the JSON response.case 'season_summary': { const { startYear, endYear } = args as { startYear: string, endYear: string } const seasonSummary = await this.apiService.getSeasonSummary(startYear, endYear) return { content: [{ type: 'text', text: JSON.stringify(seasonSummary, null, 2) }] } }
- src/handlers/tools.handler.ts:92-102 (schema)Input schema definition for the 'season_summary' tool in the listTools method.name: 'season_summary', description: 'Obtiene un resumen de pasajeros a lo largo de una temporada. Esta tool es muy útil para obtener el total de pasajeros de una temporada y ver como se distribuye por agencias.', inputSchema: { type: 'object', properties: { startYear: { type: 'string', description: 'Año de inicio de la temporada (YYYY)' }, endYear: { type: 'string', description: 'Año de fin de la temporada (YYYY)' } }, required: ['startYear', 'endYear'] } },
- src/index.ts:44-47 (registration)Registration of the callTool handler from ToolsHandler, which dispatches to specific tool implementations including 'season_summary'.this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )
- src/index.ts:38-41 (registration)Registration of the listTools method from ToolsHandler, which includes the 'season_summary' tool definition.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )
- src/services/api.service.ts:70-82 (helper)Helper method in ApiService that performs the actual API call to retrieve season summary data, used by the tool handler.async getSeasonSummary (startYear: string, endYear: string) { const headers = await this.getHeaders() const dataToSend = new URLSearchParams({ startYear, endYear }) const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/programs/season_summary`, { method: 'POST', headers, body: dataToSend }) return await this.handleResponse<any>(response) }