Skip to main content
Glama

llm_track_usage

Track Claude model token usage against daily budget, enabling progressive model downshifting and displaying per-call savings versus Opus.

Instructions

Report Claude Code model token usage for budget tracking.

Call this after using an Agent with haiku/sonnet to track token consumption against the daily budget. This enables progressive model downshifting. Shows per-call savings vs opus and cumulative session savings.

Args: model: The Claude model used — "haiku", "sonnet", or "opus". tokens_used: Approximate tokens consumed by the Agent call. complexity: The task complexity that was routed — "simple", "moderate", "complex".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
tokens_usedYes
complexityNomoderate

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so the description must disclose behaviors. It mentions reporting and tracking, but does not clarify if the tool modifies state or is read-only, nor does it discuss authentication or idempotency.

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 description is concise, front-loaded with purpose, and efficiently structured with a clear parameters section; no wasted words.

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?

Given the presence of an output schema, the description adequately covers behavior and output hints (savings shown), but lacks explicit mention of mutation vs read-only, leaving slight ambiguity.

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?

With 0% schema coverage, the description adds meaning by explaining each parameter: model options, tokens approximation, and complexity levels, though some details could be more precise.

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 clearly states the tool reports token usage for budget tracking and specifies when to call it, but it does not explicitly differentiate from sibling tools like llm_check_usage or llm_update_usage.

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?

Explicitly says to call after using an Agent with haiku/sonnet for budget tracking and progressive downshifting, but does not include when-not-to-use or alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ypollak2/llm-router'

If you have feedback or need assistance with the MCP directory API, please join our Discord server