Skip to main content
Glama

hub_stats

Calculate session costs and outcomes per task, model, role, or day; measure attempts and accept/reject verdicts from journals and price tokens for fair comparison.

Instructions

What the sessions cost and what came of it, per task, model, role or day. Tokens are READ from the clients' own databases (hub sessions ingest), bound to the task each role was ordered to work on (the queue header's "task #"); attempts and accept/reject are MEASURED from the journal (VERDICT: lines); notional is the tokens at the OpenRouter list price of their day (hub price pull), the one way to compare a free tier with a paid key. The same files give the same numbers, byte for byte. A task's attempts: task:.

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_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
fullNoreturn everything, uncapped. By default long lists are trimmed (and, where the description says so, long texts cut) to fit an agent context, and what was left out is reported in `truncated`.
taskNoone task: its attempts, each with its role, models, tokens and verdict
checkNoprove every token is bound to a task, unbound, or a probe's
groupNorows per; default task
sinceNo"7d", "12h" or a date; default everything
projectNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.88

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a lot of it: it discloses data provenance (tokens read from clients' own databases, attempts measured from journal VERDICT lines, prices from a hub price pull) and a determinism guarantee ('the same files give the same numbers, byte for byte'). Read-only character is strongly implied by 'READ' and 'MEASURED' but never stated outright, and permissions, cost of the call, and latency are unaddressed.

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 first sentence front-loads the purpose well, but the body leans on SHOUTED emphasis ('READ', 'MEASURED') and parenthetical source citations that read as internal notes rather than agent guidance. It is dense but not wasteful in content; structure and tone are what cost it.

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?

There is no output schema, so the description must describe returns, and it does partially: attempts with role, models, tokens, and verdict, plus truncation reporting. However, it never describes the shape of grouped rows for model/role/day groupings, and `project` and `check` are left to the schema's one-liners. Adequate but with clear gaps for a six-parameter reporting 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 coverage is 83%, so the schema already documents `full`, `task`, `group`, and `since` well; the description's contribution is mainly restating the group-by axis and the task drill-down. The `check` parameter's prove/unbound/probe behavior and the undocumented `project` parameter get no clarification in the description. Baseline 3 is appropriate given how much the schema already carries.

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 subject: token spend and its outcomes, broken out per task, model, role, or day, sourced from ingested hub sessions and the journal. It is clearly an analytics/reporting tool rather than a lookup or mutation tool. It does not name a sibling to contrast with (hub_attempt and hub_report exist), so it stops short of a 5.

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 by the framing — 'the one way to compare a free tier with a paid key' suggests using `notional` for cross-tier cost comparison — and 'A task's attempts: task:<id>.' hints at the per-task drill-down. But there is no explicit when-to-use/when-not guidance and no named alternative such as hub_attempt for a single attempt or hub_report for reporting. The agent must infer routing from context.

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