Skip to main content
Glama
cordlesssteve

Claude Telemetry MCP

estimate_remaining_capacity

Calculate available usage capacity by estimating remaining tokens against daily or weekly limits for Claude Code sessions.

Instructions

Estimate remaining usage capacity for specified daily/weekly limits

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daily_token_limitNoDaily token limit for capacity estimation
weekly_token_limitNoWeekly token limit for capacity estimation

Implementation Reference

  • The main handler logic for the 'estimate_remaining_capacity' tool. It retrieves the usage summary, calculates remaining tokens for daily and weekly limits based on input arguments, formats the result as markdown, and returns it.
    case 'estimate_remaining_capacity': {
      const summary = await this.telemetryService.getUsageSummary();
      const dailyLimit = typeof args?.daily_token_limit === 'number' ? args.daily_token_limit : undefined;
      const weeklyLimit = typeof args?.weekly_token_limit === 'number' ? args.weekly_token_limit : undefined;
    
      let result = '## Remaining Capacity Estimation\n\n';
      
      if (dailyLimit) {
        const remaining = Math.max(0, dailyLimit - summary.today.tokens);
        const percentage = (remaining / dailyLimit) * 100;
        result += `**Daily**: ${remaining.toLocaleString()} tokens remaining (${percentage.toFixed(1)}%)\n`;
      }
    
      if (weeklyLimit) {
        const remaining = Math.max(0, weeklyLimit - summary.thisWeek.tokens);
        const percentage = (remaining / weeklyLimit) * 100;
        result += `**Weekly**: ${remaining.toLocaleString()} tokens remaining (${percentage.toFixed(1)}%)\n`;
      }
    
      if (!dailyLimit && !weeklyLimit) {
        result += 'Please specify daily_token_limit and/or weekly_token_limit for capacity estimation.';
      }
    
      return {
        content: [
          {
            type: 'text',
            text: result,
          },
        ],
      };
    }
  • src/index.ts:113-130 (registration)
    Registration of the 'estimate_remaining_capacity' tool in the ListTools response, including its name, description, and input schema definition.
    {
      name: 'estimate_remaining_capacity',
      description: 'Estimate remaining usage capacity for specified daily/weekly limits',
      inputSchema: {
        type: 'object',
        properties: {
          daily_token_limit: {
            type: 'number',
            description: 'Daily token limit for capacity estimation',
          },
          weekly_token_limit: {
            type: 'number',
            description: 'Weekly token limit for capacity estimation',
          },
        },
        required: [],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'estimate' which implies a calculation, but doesn't disclose behavioral traits like whether it requires authentication, how it handles missing parameters, if it's read-only or has side effects, or what the output format might be. For a tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place with no redundancy or fluff. It's appropriately sized for a simple tool with two parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what the estimation returns (e.g., percentage, absolute values, timeframes), how it calculates capacity, or error conditions. For a tool in a crowded sibling set with complex usage tracking context, more completeness is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters. The description adds no additional meaning beyond what's in the schema (e.g., no explanation of how daily vs weekly limits interact, default behaviors, or unit details). Baseline 3 is appropriate when the schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('estimate') and resource ('remaining usage capacity') with scope ('for specified daily/weekly limits'). It distinguishes from siblings like 'get_current_session_usage' or 'get_usage_summary' by focusing on capacity estimation rather than raw usage data retrieval. However, it doesn't explicitly differentiate from all siblings like 'check_usage_limits' which might overlap conceptually.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools (e.g., 'get_today_usage', 'get_week_usage', 'check_usage_limits'), there's no indication of when this estimation tool is preferred over direct usage retrieval tools. It lacks context about prerequisites, timing, or comparative advantages.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/cordlesssteve/claude-telemetry-mcp'

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