thealeph_summary_stats
Retrieve API usage statistics to monitor network intelligence operations and analyze data consumption patterns.
Instructions
Get a quick summary of API usage statistics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.js:333-352 (handler)The primary handler function that executes the 'thealeph_summary_stats' tool. It calls the API client's getSummaryStats method, formats the result into a markdown table, and handles errors.async summaryStats(params) { try { const result = await this.client.getSummaryStats(); let response = '📈 API Usage Summary\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 summary statistics: ${error.message}`; } }
- src/tools.js:59-67 (registration)Tool registration in getToolDefinitions() method, defining the tool name, description, and input schema (no parameters required). This is used by the MCP server to expose the tool.{ name: 'thealeph_summary_stats', description: 'Get a quick summary of API usage statistics', inputSchema: { type: 'object', properties: {}, required: [] } },
- src/tools.js:62-66 (schema)Input schema definition for the tool, specifying an empty object with no required properties.inputSchema: { type: 'object', properties: {}, required: [] }
- src/client.js:95-97 (helper)Core API client helper that performs the actual HTTP GET request to the The Aleph API's summary stats endpoint.async getSummaryStats() { return this.makeRequest('GET', '/monitoring/stats/summary'); }
- src/tools.js:234-235 (helper)Dispatch case in executeTool switch statement that routes calls to the summaryStats handler.case 'thealeph_summary_stats': return this.summaryStats(params);