Skip to main content
Glama

Report Tool Usage

usage_report
Read-onlyIdempotent

Reports server-side tool-call telemetry from the config database: call counts, error rates, latencies and result sizes per tool, filterable by days, to audit how often 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 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 = 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: it counts out-of-pool tools too, so against the pool size it 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; 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?

Well beyond the readOnlyHint/idempotentHint annotations, it discloses the measurement bias (every count is a LOWER BOUND because sub-queries roll into the parent row and one-shot calls appear under 'aicb-call'), the privacy boundary (names and counts only, no code, argument values or session reference), and the degraded-mode behavior (available:false without a readable config DB). These are exactly the traits an agent needs and cannot get from structured fields.

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 and the critical scope warning are front-loaded and capitalized for skimming, and the return-value inventory is compactly enumerated. The middle paragraph is dense and does not reward fast reading, but each clause carries distinct operational information 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, naming totals, per-tool percentiles, errorClasses, argumentBindingErrors, ignoredArgumentCalls, protocolVersions, facets, subQueries and poolCoverage. For a zero-required-parameter read tool with full schema coverage, nothing an agent needs to call and 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 100%, so baseline is 3; the description adds real meaning for sinceDays by stating it narrows every figure and that the effective cutoff is echoed back as windowSinceIso. topTools is left entirely to the schema, which is acceptable given its self-documenting default and clamp range.

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?

Opens with a specific verb+resource ("Report the server-side tool-call telemetry") and pins the data source precisely (CallTool filter writes into the config DB's tool_calls table, across every client, not this conversation's transcript). It explicitly distinguishes itself from the pool-oriented sibling: "list_skills shows the pool; this shows what was called."

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?

States the use case ("how often, how reliably and at what cost each tool is used") and then gives explicit decision rules: read subQueries before concluding a tool is unused, read coverage from poolCoverage rather than distinctTools, and treat zero as "not called through this door." It also names the concrete alternative path (`aicb call` with vs. without --db-path) that changes what appears in the data.

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