Skip to main content
Glama

usage_stats

Read-only

Track AI token usage and estimated USD costs from the local log. Filter by model, label, or date, and group results by day, model, or label.

Instructions

Report AI token usage and estimated USD cost (from the local usage log).

Filter by model/label/since_iso (ISO-8601). group_by ∈ day|model|label.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo
modelNo
group_byNoday
since_isoNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
errorNo
groupsNo
totalsNo
filtersNo
group_byNo
call_countNo
error_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/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 genuinely useful context that the numbers come from a local usage log, but says nothing about log coverage, staleness, or cost-model assumptions. With annotations carrying the safety burden, this is adequate rather than rich.

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 short sentences with zero filler; the purpose and scope come first and the parameter contract follows. Every clause carries 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?

An output schema exists, so return values need not be explained, and the description covers the data source, all filters, and the grouping dimension. The only gap is not stating the default group_by=day or what an unfiltered call returns, which matters for a zero-required-parameter tool.

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 description coverage is 0%, so the description must carry the load, and it does: it names all four parameters, marks model/label/since_iso as filters, flags ISO-8601 format, and supplies the group_by value set day|model|label that the schema does not declare as an enum. It omits defaults (group_by defaults to day) and empty-string semantics, so it falls short of full compensation.

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 (report) and resource (AI token usage and estimated USD cost), and pins the data source with 'from the local usage log'. No sibling tool overlaps with usage/cost reporting, so an agent can select it unambiguously.

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?

Usage is implied by the reporting purpose and the filtering instructions, but the description never states when to reach for this tool versus other options or any exclusions (e.g. remote vs local accounting). It gives filtering mechanics rather than selection guidance.

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