Skip to main content
Glama
NU-AquaLab

The Aleph MCP

by NU-AquaLab

thealeph_current_stats

Retrieve API usage statistics for The Aleph MCP server over a specified period to monitor network intelligence tool consumption.

Instructions

Get current API usage statistics for the last N days

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to retrieve statistics for (1-30)

Implementation Reference

  • The main handler function for the 'thealeph_current_stats' tool. It extracts the 'days' parameter, calls the client to fetch stats, formats the response as markdown, and handles errors.
    async currentStats(params) { try { const { days = 1 } = params; const result = await this.client.getCurrentStats(days); let response = `📊 The Aleph API Statistics (Last ${days} day${days > 1 ? 's' : ''})\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 current statistics: ${error.message}`; } }
  • Input schema validation for the tool, specifying the optional 'days' parameter with constraints.
    inputSchema: { type: 'object', properties: { days: { type: 'integer', description: 'Number of days to retrieve statistics for (1-30)', minimum: 1, maximum: 30, default: 1 } }, required: [] }
  • src/tools.js:230-231 (registration)
    Registration in the tool dispatcher switch statement that routes calls to the currentStats handler.
    case 'thealeph_current_stats': return this.currentStats(params);
  • src/tools.js:27-43 (registration)
    Tool definition registration in getToolDefinitions() method, including name, description, and schema.
    { name: 'thealeph_current_stats', description: 'Get current API usage statistics for the last N days', inputSchema: { type: 'object', properties: { days: { type: 'integer', description: 'Number of days to retrieve statistics for (1-30)', minimum: 1, maximum: 30, default: 1 } }, required: [] } },
  • API client helper method that makes the HTTP request to fetch current stats from The Aleph API.
    async getCurrentStats(days = 1) { return this.makeRequest('GET', '/monitoring/stats/current', { params: { days } }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NU-AquaLab/thealeph-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server