Skip to main content
Glama
ebrindley
by ebrindley

Cursor: get usage

cursor_get_usage
Read-onlyIdempotent

Get an agent's token usage totals and per-run breakdowns. Provide a run ID to view usage for a specific run.

Instructions

Report an agent's token usage, totalled and broken down per run. Pass runId to scope it to one run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdNoRun id, in `run-<uuid>` form.
agentIdYesAgent id, in `bc-<uuid>` form.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
runsYes
totalTokensYes
chargedCentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the description doesn't need to restate safety. It adds meaningful behavior beyond annotations: that usage is aggregated and broken down per run, and that runId scopes the report. This complements rather than repeats the structured hints.

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?

Two sentences and under 20 words, with the core purpose front-loaded ('Report an agent's token usage'). It also front-loads the main action before the optional scoping detail. No filler or redundancy.

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

Completeness5/5

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

Output schema exists, so the response format is covered; annotations cover safety. The description covers what it does (usage report), how it organizes results (totalled/per-run), and how to narrow scope (runId). For a simple query with two parameters, this is complete.

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?

Schema coverage is 100%, so the baseline is 3. The description adds semantic meaning by explaining that runId scopes the report to one run and that the tool reports 'an agent's' usage, tying agentId to the purpose. This goes beyond the schema's format-only descriptions ('run-<uuid>' and 'bc-<uuid>').

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 'Report an agent's token usage, totalled and broken down per run' – a specific verb and resource, and immediately distinguishes itself from siblings like cursor_get_run or cursor_list_runs by being about usage aggregation. It also specifies the optional runId scoping with 'Pass runId to scope it to one run', reinforcing its precise purpose.

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 is clear about how to use the tool (pass runId to scope to a single run) but does not explicitly say when to use it vs alternatives. There are many siblings that inspect runs or agents, and this description doesn't mention any alternatives or exclusion criteria, so agents must infer when this usage report is the right choice.

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