Skip to main content
Glama

Get agent usage

get_agent_usage
Read-only

What background-agent runs have cost an issue (local or mirrored/upstream): one record per run (tokens by kind, machine time, agent/model/host) plus the totals. A null metric means nobody reported it — which is not the same as zero, so 'reporting' says how many records carried each metric.

Input Schema

NameRequiredDescriptionDefault
keyYesIssue key, e.g. 'UK-1'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuinely non-obvious semantics the annotations cannot convey: a null metric means a metric was never reported rather than being zero, and a 'reporting' count tells how many records carried each metric. That null-vs-zero warning is exactly the kind of interpretive context that prevents misreads of the payload.

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?

Two sentences, front-loaded with the resource and its returned shape, with the null-semantics caveat placed after the main claim where it belongs. It is dense but every clause carries information. Minor deduction because the term 'reporting' is introduced in quotes as if already known, which costs the reader a beat.

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?

There is no output schema, so the description must carry the return shape, and it does: per-run records, the metric dimensions, totals, and the null/'reporting' semantics. With one required parameter and read-only annotations, little else is essential. It would be complete at 5 with a note on whether runs are limited to a time window or paginated.

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?

There is a single parameter, 'key', documented in the schema at 100% coverage with an example ('UK-1'). The description mentions 'an issue (local or mirrored/upstream)' but does not elaborate on the key format or resolve the local-vs-mirrored ambiguity for that parameter, so it adds no meaning beyond the schema. Baseline 3 applies given full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource (background-agent runs costed against an issue) and enumerates the returned dimensions: one record per run with tokens by kind, machine time, agent/model/host, plus totals. That is far beyond restating the name. It stops short of a 5 because it never contrasts itself with the sibling tools report_agent_usage and delete_agent_usage, which share the same noun and are the obvious confusion points.

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?

Usage is only implied: the phrasing 'have cost an issue' signals a read of accumulated cost data, but there is no explicit when-to-use, no prerequisite (does the issue need to exist? does data need to have been reported first?), and no pointer to report_agent_usage for writing or delete_agent_usage for cleanup. An agent can infer the context but is not routed.

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.

Resources