Skip to main content
Glama

Report Tool Usage

usage_report
Read-onlyIdempotent

Report server-side tool-call telemetry from the config DB: call counts, error rates, durations, result sizes, clients, and coverage, so you can see how heavily and reliably each tool is 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 heavily, 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 - measured with a planted probe. 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, 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 (the caller named an argument the tool does not have) 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.

Input Schema

TableJSON 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 declare readOnly/idempotent/non-destructive, but the description goes well beyond: session-less, no code or argument values or session references returned, available:false without a readable DB, and the crucial lower-bound semantics of every count. That is exactly the kind of interpretive disclosure annotations cannot carry.

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?

Front-loaded with purpose and the scope warning, then the return shape and the window parameter, so an agent can stop reading early. It is long for a two-parameter read-only tool and some sentences (batch vs. measure phrasing) are dense, but each carries distinct scope semantics rather than filler.

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 must carry the return contract - and it does, enumerating totals fields, per-tool ranking with duration/result-size percentiles, errorClasses, aliasApplied, facets, subQueries, recordedVia, and poolCoverage with a warning to read coverage there rather than from distinctTools. Nothing needed to call or interpret it 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 already 100%, so baseline is 3, but the description adds meaning: sinceDays narrows every figure to the last N days, the 0-thus-one-day quirk and the omitted-for-whole-log behavior, and that the cutoff returns as windowSinceIso. topTools is left to the schema, which documents it fully.

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: reports server-side CallTool-filter telemetry from the config DB's tool_calls table, across every client that used the DB. It explicitly distinguishes itself from the sibling list_skills ('shows the pool; this shows what was called'), which most siblings would not infer on their own.

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 explicit when-to-use ('see how heavily, how reliably and at what cost each tool is used') and, unusually, a when-NOT-to-trust-it section ('READ THE SCOPE FIRST' - the filter only sees tools/call, batch sub-queries record the parent, so counts are lower bounds and a 0 means 'not called through this door'). This routes the agent's interpretation correctly and names the alternative (list_skills) for the population question.

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