Skip to main content
Glama

Get usage

get_usage
Read-only

Read the organisation's usage of Ankra - the same report GET /org/billing/usage serves: worker vCPU-hours, ordered playground time, managed service instance time (seconds) and storage (byte-hours), hosted logs bytes and lines, hosted metrics samples and active series (series-hours), and AI requests and tokens - one line per meter and period, optionally split by cluster, by the application a managed service serves, or by managed service instance. Give instance_id for one managed service instance's usage, or application_id for the service usage of one application's instances. Each line says its unit, quantity, coverage and price state: coverage unknown means nothing measured that period and quantity is null - unknown usage, never zero, so never report it as zero; partial means quantity is a lower bound. price_state included means Ankra charges nothing for it during the managed services pilot; priced means a published rate applies and amount_display is what it costs; unpriced means no per-unit rate applies (price_basis says why). Only priced lines carry an amount. Read-only; needs billing.read. The window is at most 93 days; a longer stretch is read in parts.

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": "get_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoThe day after the last UTC day to read, YYYY-MM-DD. Defaults to tomorrow; at most 93 days after from.
fromNoFirst UTC day to read, YYYY-MM-DD. Defaults to the first day of the current month; not after today and not more than 400 days back.
group_byNoSplit the lines by meter only (default), or also by cluster, application or managed service instance. Ignored with instance_id or application_id, which split by instance.
granularityNoPeriod of each line: a calendar month (default) or a UTC day.
instance_idNoA managed service instance id: report only that instance's instance time and storage.
application_idNoAn application id: report the instance time and storage of each managed service instance whose reviewed plan serves it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation it discloses the required scope ('needs billing.read'), the hard 93-day window, and non-obvious result semantics: coverage 'unknown' means null rather than zero, 'partial' means a lower bound, and the three price_state values with their meanings. These are exactly the behavioral facts an agent could otherwise get wrong.

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?

Purpose is front-loaded in the first clause, followed by output semantics, then parameter scoping, then limits, so the ordering is sensible and nearly every clause carries information. It is nonetheless a single dense block of roughly 180 words that would read better split into short sentences or bullets.

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?

There is no output schema, so the description carries the burden of describing return values, and it does so thoroughly: per-line meter, period, unit, quantity, coverage, and price state, plus amount_display only on priced lines. Combined with permissions and window limits, an agent has everything needed to call and interpret this tool.

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?

Schema description coverage is 100%, so the schema already documents all six parameters, including the instance_id/application_id split and the group_by interaction. The description largely restates those same meanings rather than adding syntax or edge cases, so the baseline of 3 applies.

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 verb and resource ('Read the organisation's usage of Ankra') and enumerates the exact meters covered (vCPU-hours, playground time, storage byte-hours, logs, metrics, AI requests/tokens), which lets an agent separate this from cost-oriented siblings like get_cluster_cost or get_billing_standing. It even anchors the tool to the equivalent API route GET /org/billing/usage.

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?

It explains how to narrow scope ('Give instance_id for one managed service instance's usage, or application_id for...') and notes the 93-day window must be read in parts, which is practical guidance. However, it never states when to prefer this tool over sibling billing/cost tools, nor any exclusions, so tool-selection guidance is only implied.

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.