breakdown_cost
Calculate per-model token usage and USD cost from an agent trace. Supports custom pricing overrides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace | Yes | ||
| pricing | No |
Calculate per-model token usage and USD cost from an agent trace. Supports custom pricing overrides.
| Name | Required | Description | Default |
|---|---|---|---|
| trace | Yes | ||
| pricing | No |
Changes observed during successful MCP inspections. Dates show when Glama detected each change.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It only restates the pricing override feature already visible in the schema and does not disclose behaviors like input validation, side effects, or return structure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences with no filler or redundant content. Every word adds meaning, and the key information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description should define expected return values and input constraints. It only vaguely says 'per-model token usage and USD cost' and does not describe the trace format or output breakdown, which is inadequate for a tool with nested objects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It mentions 'custom pricing overrides' and 'per-model' but does not explain the meaning of pricing.in/out fields or the required structure of trace entries.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Calculate' and identifies the resource as 'per-model token usage and USD cost from an agent trace.' This clearly distinguishes the tool from sibling tools like analyze_trace and detect_loops.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies it should be used when a cost breakdown is needed, but it does not explicitly state when to prefer this over analyze_trace or detect_loops, nor does it mention any alternatives or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.
The tools have clear granularity distinctions: analyze_trace is the comprehensive diagnostic, while detect_loops and breakdown_cost target specific aspects. However, analyze_trace overlaps with both specialized tools, which could cause an agent to hesitate between calling it or the more specific one. The descriptions mitigate this by stating the scope explicitly.
Three tools use snake_case, but while analyze_trace and detect_loops follow a verb_noun pattern, breakdown_cost is a compound noun phrase, deviating from the verb-first style. The naming is otherwise consistent and readable.
With only three tools, the server stays focused on its stated purpose of trace analysis. Each tool serves a distinct role, and the count feels appropriate for a specialized utility.
The server covers loop detection, cost breakdown, and comprehensive diagnostics including stuck-state and recommendations. No obvious gaps exist for the domain, as the full diagnostic subsumes the specialized functions.