Skip to main content
Glama
NU-AquaLab

The Aleph MCP

by NU-AquaLab

thealeph_current_stats

Retrieve API usage statistics for the specified number of days to monitor network intelligence tool performance and track resource 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 handler function that implements the core logic for the 'thealeph_current_stats' tool. Extracts the 'days' parameter, fetches data from the API client, and formats a markdown-formatted response with the statistics.
    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}`; } }
  • The JSON schema defining the input parameters for the tool, specifying the optional 'days' integer parameter with validation 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)
    The registration/mapping of the tool name to its handler function within the central executeTool switch statement.
    case 'thealeph_current_stats': return this.currentStats(params);
  • Supporting API client method that makes the HTTP request to the backend endpoint /monitoring/stats/current to retrieve the raw statistics data.
    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