Skip to main content
Glama

cost_tracker

Record and retrieve AI API call costs by team. Persists to Cloudflare KV — survives cold starts and scale-out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamNoTeam or project identifier (default: "default")
modelNoModel ID (e.g., claude-3-5-sonnet-20241022, gpt-4o, gemini-2.0-flash)
actionYes"record" to log a call, "get" to retrieve recent records
metadataNoOptional key-value metadata (request ID, user, feature flag, etc.)
inputTokensNoNumber of input/prompt tokens consumed
outputTokensNoNumber of output/completion tokens generated

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the burden of behavioral disclosure. It mentions persistence to Cloudflare KV, which is useful, but it does not disclose the side effects of the 'record' action (e.g., cost calculation logic, overwrite behavior) or what 'get' returns, including any authentication or rate-limit considerations.

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 two concise sentences, front-loaded with the primary purpose and followed by a valuable persistence note. Every word contributes, with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has dual actions ('record' and 'get') and six parameters, with no output schema or annotations. The description covers the core purpose but omits action-specific behavior, response format, and guidance on which parameters are needed per action. Given the presence of siblings, more contextual detail would improve completeness.

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 description coverage is 100%, so the baseline is 3. The description adds 'by team' which maps to the team parameter, but it does not elaborate on parameter formats, defaults, or relationships beyond what the schema already provides.

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 clearly states the tool's function: 'Record and retrieve AI API call costs by team.' This is a specific verb+resource combo that distinguishes it from sibling tools like cost_forecast (forecasting) and model_breakdown (breakdown analysis).

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?

The description implies usage for recording and retrieving costs, but does not explicitly state when to choose this tool over alternatives. No exclusions or conditions are mentioned, and sibling tools like budget_alert or cost_forecast are not referenced.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4/5.0
Disambiguation5/5

Each tool targets a distinct aspect of cost optimization: tracking, forecasting, alerting, breakdown, and calculation. There is no functional overlap between any pair of tools, making selection unambiguous.

Naming Consistency5/5

All tool names follow a consistent pattern of two lowercase nouns joined by an underscore (e.g., cost_tracker, model_breakdown). The naming style is uniform and predictable.

Tool Count5/5

Five tools is a well-scoped size for an AI cost optimizer, covering the essential operations without unnecessary complexity. Each tool serves a clear and necessary function.

Completeness4/5

The core workflows are covered: recording, retrieving, forecasting, alerting, breakdown, and calculation. Minor gaps exist (no update or delete operations), but agents can accomplish the main lifecycle without significant friction.