Skip to main content
Glama

Get What Used the Allowance

getUsageBySource
Read-onlyIdempotent

What used a calendar month's allowance (period=YYYY-MM, default this month; not the billing period): billed seconds and tokens per standard test, mission test, mapping job, load test and Quinn, largest first, at most 20, each with its id and name where they can be found (null otherwise). otherSources counts the sources left out. Mission testing is not itemised per test today and shows as one mission_test row with no id. Use when: someone asks which tests or maps used their minutes. Owner or billing admin only; other roles get 403. Only a person signed in to the nopaque web app can call this; an API key is refused.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "getUsageBySource"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoThe month, YYYY-MM (UTC). Default is the current month.

Output Schema

NameRequiredDescriptionDefault
sourcesYes
otherSourcesYes
billingPeriodYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / workspaceId
      Removed value: -{
      -  "description": "Workspace identifier. Must be the caller's current workspace.",
      -  "format": "uuid",
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "workspaceId"
      -]
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description goes well beyond them: role-based 403 behaviour, the requirement of a signed-in web-app session with API keys refused, the 20-row cap with otherSources counting the remainder, and the caveat that mission testing is collapsed into a single id-less mission_test row. The only omission is that it doesn't explain what happens at the cap beyond the count, but that is largely covered by otherSources.

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?

It is a single dense paragraph that front-loads the answer (what was used, in what units, in what order) before the caveats and access rules. The parenthetical nesting around defaults and null ids makes it run slightly long and harder to scan, but every clause carries operational information.

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?

Output is covered by an output schema, yet the description still spends significant space describing the return rows, ids and otherSources, which is useful for result interpretation. For a read-only one-parameter tool the auth and period information is complete, but the heavy return-value detail is somewhat redundant given the output schema, leaving it strong yet not fully efficient.

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% and the single parameter already documents the YYYY-MM pattern and current-month default, so the baseline is 3. The description still adds meaning the schema does not: the period is a calendar month in UTC and explicitly not the billing period, which is exactly the kind of semantic distinction an agent needs when choosing the argument.

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 and resource – what consumed a calendar month's allowance – and enumerates the exact source types returned (standard test, mission test, mapping job, load test, Quinn), the ordering, the cap of 20, and the id/name enrichment. It also disambiguates the period semantics (calendar month, not billing period), so an agent can tell this apart from period-based usage siblings without opening a 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?

It gives an explicit trigger: "Use when: someone asks which tests or maps used their minutes," which is a clear caller question this tool answers. It adds hard access preconditions (owner or billing admin, signed-in web-app user, API key refused), but it does not state when to prefer a different usage tool such as a workspace-level or current-period variant, so there is no explicit exclusion.

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.