thealeph_daily_stats
Retrieve API usage statistics for a specific date to monitor network intelligence activity and track data consumption patterns.
Instructions
Get API usage statistics for a specific date
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date in YYYY-MM-DD format |
Implementation Reference
- src/tools.js:308-328 (handler)The main handler function that executes the 'thealeph_daily_stats' tool logic: extracts 'date' param, fetches data via client, formats as Markdown summary, handles errors.async dailyStats(params) { try { const { date } = params; const result = await this.client.getDailyStats(date); let response = `📅 API Statistics for ${date}\n\n`; if (typeof result === 'object') { for (const [key, value] of Object.entries(result)) { response += `**${key}:** ${JSON.stringify(value, null, 2)}\n`; } } else { response += `${JSON.stringify(result, null, 2)}`; } return response; } catch (error) { return `❌ Failed to retrieve daily statistics: ${error.message}`; } }
- src/tools.js:44-58 (schema)Tool schema definition (name, description, inputSchema) provided to MCP server via getToolDefinitions().{ name: 'thealeph_daily_stats', description: 'Get API usage statistics for a specific date', inputSchema: { type: 'object', properties: { date: { type: 'string', description: 'Date in YYYY-MM-DD format', pattern: '^\\d{4}-\\d{2}-\\d{2}$' } }, required: ['date'] } },
- src/tools.js:232-233 (registration)Registration in the executeTool switch statement that dispatches to the handler.case 'thealeph_daily_stats': return this.dailyStats(params);
- src/client.js:88-90 (helper)Supporting API client method that performs the actual HTTP GET request to /monitoring/stats/daily/{date}.async getDailyStats(date) { return this.makeRequest('GET', `/monitoring/stats/daily/${date}`); }