get_weekly_reports
Retrieve weekly market analysis reports from the Spanish stock exchange, including market overviews, sector breakdowns, and governance insights.
Instructions
Get generated weekly reports and analysis
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_weekly_reports"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reportType | No | Type of report to filter by | |
| limit | No | Maximum number of reports |
Implementation Reference
- src/database.ts:331-337 (handler)Core handler function that executes the tool logic by fetching weekly reports from the API endpoint '/api/reports'.
async getWeeklyReports(reportType?: string, limit: number = 10): Promise<any[]> { const data = await this.fetchAPI('/api/reports', { type: reportType, limit: limit }); return data.reports || []; } - src/index.ts:316-334 (registration)Tool registration in ListToolsRequestHandler defining the tool name, description, and input schema.
{ name: 'get_weekly_reports', description: 'Get generated weekly reports and analysis', inputSchema: { type: 'object', properties: { reportType: { type: 'string', enum: ['market_overview', 'sector_analysis', 'governance_highlights', 'full_report'], description: 'Type of report to filter by', }, limit: { type: 'number', description: 'Maximum number of reports', default: 10, }, }, }, }, - src/index.ts:645-647 (handler)MCP CallToolRequestHandler switch case that invokes the database handler with parsed arguments.
case 'get_weekly_reports': result = await this.db.getWeeklyReports((args as any)?.reportType, (args as any)?.limit || 10); break; - src/index.ts:322-332 (schema)Input schema definition for tool parameters (reportType and limit).
reportType: { type: 'string', enum: ['market_overview', 'sector_analysis', 'governance_highlights', 'full_report'], description: 'Type of report to filter by', }, limit: { type: 'number', description: 'Maximum number of reports', default: 10, }, },