Skip to main content
Glama

Set Usage Stats

set_usage_stats
DestructiveIdempotent

Enable or disable local tool-call counters, or clear collected counts, only when requested; stores tool name, client, time, duration, status, and result size on this computer.

Instructions

Turn the local tool-call counters on or off, or delete them, only when the user asks. They hold tool name, client, time, duration, ok or error and result size on this computer only; nothing else.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "enabled": "<enabled>"
    },
    "name": "set_usage_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
clearNoAlso delete the counts so far.
enabledYesTrue to count calls, false to stop.

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 flag destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds value beyond that by disclosing the exact scope of stored data (tool name, client, time, duration, outcome, result size), that it is local to this computer only, and that nothing else is collected — meaningful privacy/breadth context for a destructive toggle. It does not discuss reversibility of disabling or how existing counts are treated.

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?

Two sentences, front-loaded with the action and the consent constraint. The second sentence is telegraphic and slightly awkward in its list phrasing, but it is compact and carries no filler.

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 and annotations covering destructiveness and idempotency, the description fills the remaining gaps an agent needs: what the counters contain, that they are local-only, and that a user request is required. Minor omission is what happens to existing counts when merely disabling.

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 description coverage is 100%, and both parameters (enabled, clear) carry their own inline descriptions, so the baseline is 3. The description's "on or off, or delete them" loosely maps to those two flags but adds no syntax or interaction detail beyond the schema.

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 gives a concrete verb set and object: turn local tool-call counters on/off or delete them. An agent can tell this is a configuration/state tool rather than a data-retrieval sibling like get_usage_stats, though the read counterpart is not named explicitly.

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?

"Only when the user asks" is a real gating condition that implies user consent is required before changing state, which is useful context. However, it does not spell out when to choose this over inspecting stats first, nor any explicit when-not conditions beyond the consent gate.

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