Skip to main content
Glama

get_token_savings_metrics

Calculate token compression metrics, reduction percentages, and monthly developer cost savings to quantify T-Zero context compression ROI for team reports.

Instructions

Computes quantitative token compression metrics, reduction percentage, and developer team financial ROI savings (USD/month).

Behavior:

  • Read-only: Evaluates codebase file sizes and compressed token counts; does not alter files or call APIs.

  • Idempotent: Deterministic metric calculations for current codebase volume.

  • 100% Offline: Fully local calculation without network access.

Usage Guidelines:

  • When to use: Quantify efficiency gains and financial savings from T-Zero context compression for team reports and engineering leadership.

  • Sibling Routing: For per-model single-prompt cost comparisons (OpenAI vs Anthropic vs Gemini), use 'estimate_token_cost'.

Returns: Markdown executive summary with token reduction percentages, monthly developer cost savings, and annual ROI projections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_sizeNoNumber of developers in the engineering team used to model monthly ROI savings (default: 5).
project_rootNoTarget workspace directory to measure (default: current directory)..

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / project_root / description
      Added value: +"Target workspace directory to measure (default: current directory)."
    • addedInput schema / properties / team_size / description
      Added value: +"Number of developers in the engineering team used to model monthly ROI savings (default: 5)."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/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 discloses read-only, idempotent, and 100% offline behavioral traits, plus indicates the return format. Missing finer details like auth requirements or what happens on invalid project_root, but the core behavioral profile is well covered.

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?

Front-loaded purpose sentence, then clearly labeled Behavior, Usage Guidelines, and Returns sections. No filler; every line adds information an agent needs.

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?

Output schema exists so return values needn't be detailed, yet a brief Returns summary is still helpful. Read-only/idempotent/offline behavior, sibling routing, and usage context are all present; only minor edge-case behavior is absent.

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?

Schema coverage is 100% so baseline is 3. The description's Returns section clarifies the output depends on team_size (monthly ROI) and project_root (codebase measurement), adding meaning to how parameters affect results beyond the schema's field-level docs.

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?

States a specific verb (computes) and precise resource (quantitative token compression metrics, reduction percentage, developer team financial ROI savings). Distinguishes itself from the single sibling it could be confused with by naming 'estimate_token_cost' explicitly.

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

Usage Guidelines5/5

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

Explicit 'When to use' targeting team reports and engineering leadership, plus explicit sibling routing naming 'estimate_token_cost' with its differentiating scope (per-model single-prompt cost comparisons). Covers both when-to-use and when-to-use-something-else.

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