Skip to main content
Glama

Report Tool Usage

usage_report
Read-onlyIdempotent

Reports server-side tool-call telemetry from the config DB across all clients: call counts, error rates, latency and result sizes per tool, showing which tools are actually used.

Instructions

Report the server-side tool-call telemetry: what the CallTool filter recorded into the config DB's tool_calls table, across every client that used this DB - not this conversation's transcript. list_skills shows the pool; this shows what was called.

Use it to see how often, how reliably and at what cost each tool is used. READ THE SCOPE FIRST: the filter sits on the tools/call pipeline. A one-shot aicb call writes the same row under the client name 'aicb-call' when given a --db-path, and nothing without one. A sub-query inside batch or measure records the PARENT call and no child row. So every count here is a LOWER BOUND, and a tool at 0 was not called THROUGH THIS DOOR rather than not called. A batch parent's row does carry a tally of its sub-queries, returned as subQueries: read it before calling a tool unused.

Returns totals (totalCalls, errorCalls, errorRatePct, distinctTools, distinctSessions, clientSessions, firstTs, lastTs, clients, serverVersions); tools, ranked by calls, each with errors, duration (ms) and result size (chars) as average, p50, p90 and max, plus - when non-zero - errorClasses (exception type names; McpException is a failure the tool raised on purpose), argumentBindingErrors (an argument the tool does not have), ignoredArgumentCalls (the call answered anyway) and aliasApplied; protocolVersions and clientEras (who called, on which protocol revision); facets; subQueries; recordedVia; and poolCoverage (poolSize, poolToolsFired, poolToolsNeverCalled, outOfPoolTools). Read coverage THERE, not from distinctTools: that figure counts every tool called including ones outside the pool, so holding it against the pool size overstates coverage.

The answer carries shapes only - names, counts, exception type names - no code, no argument values and no session reference. Without a readable config DB it answers available:false.

Read-only and session-less. sinceDays narrows every figure to the last N days (1..3650, so 0 means one day; omit it for the whole log); the cutoff comes back as windowSinceIso.

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

Input Schema

NameRequiredDescriptionDefault
topToolsNoCap on the per-tool breakdown, ranked by call count (default 30; clamped to 1..200).
sinceDaysNoOnly count calls from the last N days (omit for the whole log; clamped to 1..3650).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already say readOnly/idempotent/non-destructive, and the description adds behaviour the annotations cannot: every count is a lower bound, batch parents record subQueries tallies instead of child rows, the response is shapes-only (no code, no argument values, no session refs), and an unreadable config DB yields available:false. This is exactly the extra context the lower annotation bar asks for.

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?

Five dense paragraphs are justified for a tool with this many semantic traps, and the scope warning is front-loaded with a 'READ THE SCOPE FIRST' marker. The long parenthetical enumerations of return fields are heavy prose that could be tightened, but almost every sentence earns its place.

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?

With no output schema and only two parameters, the description carries the full burden of explaining returns and does so: totals, per-tool percentiles, errorClasses, argumentBindingErrors, poolCoverage, subQueries, recordedVia, and the available:false fallback. Nothing an agent needs to interpret or trust the report is missing.

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%, so sinceDays and topTools are already documented, but the description adds semantics beyond the schema: that omitting sinceDays means the whole log, that the cutoff is echoed as windowSinceIso, and that every figure is narrowed by the window. It leaves topTools entirely to the schema, so it stops short of a 5.

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 ('Report the server-side tool-call telemetry ... recorded into the config DB's tool_calls table') and explicitly bounds the scope against the conversation transcript and against the sibling list_skills ('list_skills shows the pool; this shows what was called'). An agent can distinguish it from every neighbouring tool 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a use case ('to see how often, how reliably and at what cost each tool is used'), a routing rule versus list_skills, and an explicit anti-misuse warning about reading poolCoverage rather than distinctTools. It also names the situations that produce misleading zeros (one-shot aicb call without --db-path, sub-queries inside batch/measure), which is usage guidance of an unusually high order.

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