Skip to main content
Glama

hub_usage

Reports work cost over a time window per project and agent, keeping client-supplied usage separate from measured spans and journal events.

Instructions

What the work cost, over a window, per project and per agent — with a hard line between SUPPLIED (seconds/tokens/money, reported by clients through hub_usage_add: what the hub can neither measure nor read; a session's tokens are READ by hub_stats) and MEASURED (closed-task spans and journal events, the hub's own arithmetic). The split is the point: a cost number that mixes an observed span with a guessed rate gets quoted later as if someone had counted.

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

Input Schema

NameRequiredDescriptionDefault
daysNodefault 7
agentNo
projectNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does valuable work disclosing data provenance — what is SUPPLIED by clients versus MEASURED by the hub, and the hazard of mixing an observed span with a guessed rate. It adds nothing about return shape, pagination, permissions, or what happens with the default window beyond the schema's 'default 7'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first clause, but the sentence then runs long with an editorial closing line ('The split is the point… quoted later as if someone had counted') that motivates the design more than it helps invocation. The SUPPLIED/MEASURED contrast is worth keeping; the closing rhetoric is not.

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?

With no annotations, no output schema, and low parameter coverage, the definition should do more. It covers the semantic hazard of the numbers well, but leaves the caller unsure what the response contains (fields, grouping granularity, top-level shape) and how the filter parameters behave.

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 coverage is only 33% (only 'days' is documented), so the description must compensate. It does imply that results are grouped per project and per agent, which gives some meaning to the 'agent' and 'project' parameters, but it never says whether those act as filters or as grouping axes, or what format they accept.

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 states a specific resource (cost/usage over a window, broken out per project and per agent) and implicitly frames it as a reporting read rather than a mutation. It also distinguishes itself from hub_usage_add (ingest) and hub_stats (token reads), though the verb itself — 'report' or 'return' — is never stated explicitly.

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 implied rather than stated: hub_usage_add is named as the write path for supplied data and hub_stats as the token reader, which lets an agent infer this tool is for aggregated cost. However, there is no explicit 'use this when… / use X instead when…' sentence, and no prerequisites or exclusions are given.

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