Skip to main content
Glama

report_cost

Attribute token and compute costs to a changeset by submitting usage metrics including input, cached, and output tokens, plus cost in micro-dollars. Accumulate reports to track project spending.

Instructions

Attribute your token/compute usage to a changeset (the id returned by propose_changeset). Reports accumulate. cost_microdollars is integer micro-dollars (1 = $0.000001).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
changesetYes
input_tokensNo
cached_tokensNo
output_tokensNo
cost_microdollarsNo
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that reports accumulate (additive behavior) and clarifies the unit of cost_microdollars. However, it does not mention whether the operation is a write or if it has side effects beyond attribution, nor does it describe error behavior or reversibility. It adds some context but not comprehensive transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the purpose, and includes crucial unit clarification. No extraneous words. It could be more structured (e.g., separating parameter notes), but it is efficient and well-ordered.

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?

For a simple reporting tool, the description provides key facts: the source of the changeset id and the accumulation behavior. However, with no annotations and no output schema, it omits details like what happens on success/failure, whether all token fields are required together, or how to handle partial reports. The absence of any explanation of the remaining numeric fields leaves gaps for an agent trying to invoke it correctly.

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

Parameters2/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 compensate for all six parameters. It only explains changeset (source of value) and cost_microdollars (unit). The other parameters (model, input_tokens, cached_tokens, output_tokens) are left to their names, which are not fully self-explanatory (e.g., what counts as cached_tokens?). This falls short of adequate 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?

The description states a specific verb ('Attribute') and a clear resource ('token/compute usage to a changeset'), and precisely identifies the source of the changeset id ('returned by propose_changeset'). This leaves no doubt what the tool does and distinguishes it from sibling tools like propose_changeset or propose_graph_update.

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?

It gives a clear prerequisite: the changeset must be the id returned by propose_changeset, which tells the agent when this tool is appropriate. It also states that reports accumulate, implying multiple calls are allowed. However, it does not explicitly list when NOT to use it or mention alternative tools for cost tracking, so it's slightly short of a 5.

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/mahabubul470/gpp'

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