Skip to main content
Glama

get_stats

Read-onlyIdempotent

Retrieve token usage, session budget, and subsystem stats by category for a project to monitor and optimize token-savior behavior.

Instructions

Unified stats dispatcher. category = usage (default) | session_budget | tca | dcp | linucb | warmstart | leiden | speculation | lattice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoProject name/path (default: active).
categoryNoWhich stats subsystem to report (default 'usage').
context_typeNoFor category=lattice: filter to one context (navigation/edit/review/unknown).
budget_tokensNoFor category=session_budget: soft budget cap (default 200000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

C2.3/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds nothing beyond that — it does not say whether category selection changes cost, whether results are cached/fresh, or whether project scoping affects output.

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

Conciseness3/5

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

It is short and front-loaded, but the second sentence is pure duplication of the schema enum and therefore does not earn its place. No wasted prose beyond that, but also no added value.

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?

This is a multi-mode dispatcher with four parameters and no output schema, so the description carries the burden of explaining the modes. It leaves every one of the nine categories undefined, so an agent cannot predict what any call returns.

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 already documents project, category, context_type, and budget_tokens, giving a baseline of 3. The description merely re-lists the category enum values, which the schema already defines, and adds no per-category semantics (e.g., what tca or linucb report).

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

Purpose2/5

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

"Unified stats dispatcher" largely restates the tool name (get_stats) without saying what statistics are produced, over what domain, or what each category means. The category list hints at breadth but none of the categories (tca, dcp, linucb, leiden, speculation, lattice) are explained, so an agent cannot tell what it will actually receive.

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?

No guidance on when to call this versus sibling reporting tools such as get_project_summary, get_diagnostics, or get_structure_summary, and no conditions distinguishing it from those. Only the default value of category is stated; the agent must infer all usage context.

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