Skip to main content
Glama

llm_track_usage

Track Claude token usage against daily budgets to monitor cost savings and enable progressive model downshifting based on task complexity.

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?

With no annotations provided, the description carries full disclosure burden. It adds valuable behavioral context about outputs ('Shows per-call savings vs opus and cumulative session savings') and explains the budget-tracking purpose. However, it omits whether this performs a write operation, idempotency characteristics, or side effects on the daily budget state.

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 well-structured and front-loaded, opening with the core purpose, followed by usage timing, business logic (downshifting), output behavior, and a structured Args section. Every sentence provides distinct value with no redundancy or filler text.

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 appropriately summarizes return values (savings comparisons) without replicating the schema. It covers the operational workflow, parameter semantics, and budget context. A minor gap remains regarding prerequisites or side effects, but overall coverage is strong for a tracking utility.

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

Parameters5/5

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

The Args section fully compensates for 0% schema description coverage by documenting all 3 parameters with clear semantics and explicit enum values: model ('haiku', 'sonnet', or 'opus'), tokens_used ('Approximate tokens consumed by the Agent call'), and complexity ('simple', 'moderate', 'complex'). This adds critical meaning missing from the raw schema.

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 'Report[s] Claude Code model token usage for budget tracking' with specific context about enabling 'progressive model downshifting.' However, it does not explicitly differentiate from similar sibling tools like 'llm_usage' or 'llm_check_usage,' leaving some ambiguity about which tracking tool to use when.

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?

Provides explicit workflow guidance: 'Call this after using an Agent with haiku/sonnet to track token consumption against the daily budget.' This establishes clear timing and context. It lacks explicit 'when-not-to-use' instructions or named alternatives, but the temporal cue ('after using an Agent') effectively guides selection.

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