statistics
Generate and analyze daily statistics for investment funds in Turkey using the FonParam MCP server. Filter by date range, sort data, and paginate results for detailed insights.
Instructions
Günlük istatistikleri listeler
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | Bitiş tarihi (YYYY-MM-DD) | |
| limit | No | Sayfa başına kayıt sayısı | |
| order | No | Sıralama yönü | |
| page | No | Sayfa numarası | |
| sort | No | Sıralama alanı | |
| start_date | No | Başlangıç tarihi (YYYY-MM-DD) |
Input Schema (JSON Schema)
{
"properties": {
"end_date": {
"description": "Bitiş tarihi (YYYY-MM-DD)",
"type": "string"
},
"limit": {
"description": "Sayfa başına kayıt sayısı",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"order": {
"description": "Sıralama yönü",
"enum": [
"ASC",
"DESC"
],
"type": "string"
},
"page": {
"description": "Sayfa numarası",
"minimum": 1,
"type": "number"
},
"sort": {
"description": "Sıralama alanı",
"type": "string"
},
"start_date": {
"description": "Başlangıç tarihi (YYYY-MM-DD)",
"type": "string"
}
},
"type": "object"
}
Implementation Reference
- src/tools.ts:517-519 (handler)Handler logic for the 'statistics' MCP tool within the handleToolCall switch statement. Parses arguments using StatisticsSchema and delegates to the API client's getStatistics method.case 'statistics': const statsParams = StatisticsSchema.parse(args); return await this.apiClient.getStatistics(statsParams);
- src/tools.ts:58-65 (schema)Zod schema (StatisticsSchema) used for input validation of the 'statistics' tool parameters.const StatisticsSchema = z.object({ start_date: z.string().optional(), end_date: z.string().optional(), sort: z.string().optional(), order: z.enum(['ASC', 'DESC']).optional(), page: z.number().min(1).optional(), limit: z.number().min(1).max(100).optional() });
- src/tools.ts:323-358 (registration)Registration of the 'statistics' tool in the getTools() array, defining its name, description, and JSON inputSchema.{ name: 'statistics', description: 'Günlük istatistikleri listeler', inputSchema: { type: 'object', properties: { start_date: { type: 'string', description: 'Başlangıç tarihi (YYYY-MM-DD)' }, end_date: { type: 'string', description: 'Bitiş tarihi (YYYY-MM-DD)' }, sort: { type: 'string', description: 'Sıralama alanı' }, order: { type: 'string', description: 'Sıralama yönü', enum: ['ASC', 'DESC'] }, page: { type: 'number', description: 'Sayfa numarası', minimum: 1 }, limit: { type: 'number', description: 'Sayfa başına kayıt sayısı', minimum: 1, maximum: 100 } } }
- src/api-client.ts:129-132 (helper)API client helper method that performs the HTTP GET request to '/statistics' endpoint to retrieve paginated daily statistics data.async getStatistics(params: StatisticsParams = {}): Promise<PaginatedResponse<DailyStatistics>> { const response: AxiosResponse<PaginatedResponse<DailyStatistics>> = await this.client.get('/statistics', { params }); return response.data; }
- src/types.ts:105-113 (schema)TypeScript interface defining the structure of DailyStatistics returned by the statistics tool.export interface DailyStatistics { date: string; total_funds: number; total_companies: number; total_investors: number; total_aum: number; avg_profit: number; avg_loss: number; }