Skip to main content
Glama

Summarise measured token costs

cost_summary

Run a cost analysis in a repository to measure token usage from eval runs and get savings recommendations in leverage order, from prompt caching to model routing.

Instructions

Run groundwork cost in a repo: measured token usage from eval runs, with savings recommendations in leverage order (prompt caching, batching, context trimming, model routing last).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirYesAbsolute path to the repo root

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it discloses that it executes a command and describes the output shape, including the leverage-order for recommendations. It does not state whether the command has side effects, requires network access, or has prerequisites, which is a gap for an execution-type tool.

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 entire description is one efficient sentence that leads with the concrete command and packs in the key outputs and their ordering. There is no filler or redundancy.

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 single-parameter tool with no output schema, the description covers the core behavior and the nature of the returned recommendations. It omits prerequisites or failure behavior, but these are not critical for a straightforward cost-summary invocation.

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 only parameter (dir) is already documented as 'Absolute path to the repo root'. The description reinforces the repo context but adds no new parameter semantics beyond the schema, so the baseline score applies.

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

Purpose5/5

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

The description uses a specific verb/resource pair ('Run groundwork cost') and states the exact output: measured token usage from eval runs and savings recommendations. This clearly distinguishes it from the sibling correctness/readiness/scaffolding tools.

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

Usage Guidelines4/5

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

It provides clear context that the tool operates in a repo and produces cost information, so an agent can infer when to select it. It does not explicitly name alternatives or when-not-to-use conditions, but with unrelated siblings this is a minor gap.

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