Skip to main content
Glama

Get Usage

get_usage
Read-only

The A2 usage ledger: every metered billing event newest-first with attribution — featureId, amount, the project/job that produced it, and the event's LIST price in USD (a plan allowance may zero it on the invoice). Answer "what did project X cost this period?" with a query instead of summing your own quotes. Filter by projectId, jobId, and/or a [from, to) epoch-ms window. Requires the billing:read scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoPeriod end, epoch milliseconds, EXCLUSIVE.
fromNoPeriod start, epoch milliseconds, INCLUSIVE.
afterNoOpaque cursor from the previous page's `pagination.nextCursor`. Forward-only.
jobIdNoOnly events produced by this job — how to answer "did my failed render post a charge?" for one run.
limitNoPage size (1..100), default 20. Out-of-range or unparseable clamps into the range.
projectIdNoOnly events attributed to this project.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
paginationNoCursor pagination metadata.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint=false, so this description earns credit for adding real context: newest-first ordering, that the amount is the event's LIST price which a plan allowance may zero on the invoice, and the billing:read scope requirement. It does not discuss paging behavior beyond the cursor schema.

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?

Three sentences, front-loaded with the ledger definition, then the usage motivation, then the filter and scope facts. Dense but each clause carries information; the parentheticals are load-bearing rather than filler.

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?

With an output schema present, return values need no explanation, and the description covers ordering, attribution fields, price interpretation, filtering, auth, and pagination entry point. What remains unstated (paging loop behavior, empty-result semantics) is minor for a read-only list tool.

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% (baseline 3), and the description adds meaning on top: it frames projectId/jobId/[from,to) as the filter set and motivates jobId with the "did my failed render post a charge?" use case. It restates rather than extends the from/to inclusivity semantics already documented.

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?

States a specific resource (the A2 usage ledger of metered billing events) with a clear scope (newest-first, attributed) and enumerates the fields returned. No sibling tool covers billing/usage, and the description makes the ledger's identity unmistakable without opening the schema.

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?

Gives a concrete usage scenario ("what did project X cost this period?") and the intended method — query rather than summing quotes — plus the billing:read scope prerequisite and the filter axes. It stops short of naming when NOT to use it or a sibling alternative, but there is no competing billing tool to route against.

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.