Skip to main content
Glama

usage_stats

Returns usage statistics—tokens returned versus avoided, tool calls, and symbols or sections retrieved—for the current session, project lifetime, or overall view, with optional repo filtering.

Instructions

Returns usage statistics: tokens returned vs avoided, tool calls, symbols and sections retrieved. Three levels: current session, per-project lifetime, and overall. Filterable by repo.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "usage_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoNoOptional: show stats for a specific repo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description bears the full burden. It discloses the metric set and the three aggregation levels, which is meaningful for a read-only stats tool and effectively covers the missing output schema. It says nothing about cost, permissions, whether session stats reset, or whether the numbers require prior indexing, which leaves real gaps.

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?

Two sentences, zero padding. The core purpose and the returned metrics are front-loaded, and the scoping levels plus filter follow immediately. Nothing repeats the title or wastes space.

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

Completeness4/5

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

For a one-optional-parameter read tool with no output schema, the description supplies enough: it lists what is returned and the levels available. Only the interaction between the repo filter and the session/lifetime levels is left to inference, which is a minor gap rather than a blocking one.

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 coverage is 100% and the single optional 'repo' parameter is already documented with its own description. The phrase 'Filterable by repo' restates the schema without adding scope semantics such as whether the filter affects only the lifetime levels or what the default aggregate covers. Baseline 3 applies.

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 opens with a specific verb+resource ('Returns usage statistics') and enumerates the returned metrics: tokens returned vs avoided, tool calls, symbols and sections retrieved. That is far more specific than the name alone. It does not differentiate against any sibling, but no sibling in the visible list plausibly does the same thing.

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

Usage Guidelines3/5

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

The three scopes (current session, per-project lifetime, overall) and the repo filter imply when the tool is useful, and an agent can infer you call it to check consumption. There is no explicit when-to-use or when-not guidance, and no named alternative for related questions such as indexed repos or version drift.

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