Skip to main content
Glama

ctx_stats

Read-only

Compare estimated tokens returned against a naive whole-file or raw-output baseline per tool, for the current session and across all project sessions.

Instructions

Estimated tokens returned versus a naive baseline (whole files, raw output), per tool, for this session and all sessions of this project.

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": "ctx_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: what is being estimated, what the comparison baseline is (whole files, raw output), the per-tool granularity, and the two aggregation scopes (this session and all sessions of this project). It stops short of noting cost or output format, so a 4 rather than 5.

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

Conciseness4/5

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

A single sentence with no filler, and the core meaning (estimated vs naive baseline tokens) is front-loaded. The trailing 'per tool, for this session and all sessions of this project' is dense but each clause carries real scoping information. Slightly tangled phrasing keeps it from a 5.

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?

With zero parameters, no output schema, and read-only annotations, the bar is low, and the description covers what is measured, the comparison basis, the breakdown dimension, and the time scope. An agent knows what it will receive well enough to call it. The exact shape of the returned figures is inferable but not spelled out.

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

Parameters4/5

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

The tool takes zero parameters, so the baseline is 4. The description correctly implies a parameterless call by describing both aggregation scopes as fixed rather than selectable, leaving nothing for the schema to document.

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 states a concrete output: estimated tokens returned versus a naive baseline (whole files, raw output), broken down per tool and scoped to the session and project. That is specific enough that an agent can tell it apart from content-retrieval siblings like ctx_read or ctx_search. It does not explicitly name a sibling to differentiate from, which keeps it short of a 5.

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?

No explicit when-to-use or when-not-to-use statement, and no alternative is named. Usage is only implied: the tool reports token-efficiency metrics, so an agent infers it is for inspecting context savings rather than fetching file content. Adequate but leaves routing to inference.

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