Skip to main content
Glama

Get Usage Stats

get_usage_stats
Read-onlyIdempotent

Retrieves local tool-call counters—calls, errors, time per tool/client, daily calls, and longest call bursts—over a chosen lookback period to help diagnose lost assistants and usage patterns.

Instructions

Local tool-call counters (on by default; set_usage_stats turns them off): calls, errors and time per tool and client, calls per day, and the longest bursts of calls (dozens in a row means a lost assistant).

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

Input Schema

NameRequiredDescriptionDefault
daysNoLook back this many days.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.30.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description adds genuinely new behavior: the counters are local, enabled by default, mutable via a sibling tool, and 'dozens in a row' of calls signals a lost assistant. It does not state persistence or reset semantics, keeping it below a 5.

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?

It is a single compact sentence with the core resource front-loaded and the sibling toggle kept in a parenthetical. The embedded operational tip about bursts is useful rather than filler. Slight density and the mid-sentence parenthetical interrupt the flow a little.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not describe return values, and it correctly spends its words on default state, the toggle sibling, and result interpretation instead. For a one-parameter read-only stats tool this is close to sufficient; only counter retention/reset behavior is left unstated.

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?

The single parameter (days, default 30, range 1-90) is fully documented in the schema, so coverage is 100% and the baseline of 3 applies. The description says nothing about the lookback window beyond the name, adding no meaning over the schema. That is acceptable here but not additive.

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 names the resource precisely (local tool-call counters) and enumerates what is measured: calls, errors and time per tool and client, calls per day, and longest call bursts. It is clearly distinguishable from the metrics-oriented siblings like get_health or get_fleet_summary. It lacks an explicit verb, relying on the name/title for the action, which keeps it just 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?

It states the tool is on by default and points to set_usage_stats as the toggle, which is a useful routing hint. However, there is no explicit when-to-use guidance against other diagnostic siblings (get_health, get_event_log), and the interpretive hint about bursts only implies the intended use case. Usage is suggested rather than instructed.

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