Skip to main content
Glama

agent-intern usage statistics (local)

agent_stats
Read-onlyIdempotent

Summarize local delegation usage—calls, errors, latency, backend health, weekly trends, token counts, saved swarm answers, and remaining quota—without storing prompts, answers, or raw errors.

Instructions

Show how the delegation tools have been used, from a local file. Calls per backend (ok, errors, average seconds), per day and per week, backend health (error rate and the last error's category), recent swarms with where their saved answers are, token counts where a backend reports them, and Antigravity's remaining quota. Numbers only: no prompt, answer or raw error text is ever stored (turn recording off with AGENT_INTERN_NO_STATS=1). Spends no quota.

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

Input Schema

NameRequiredDescriptionDefault
daysNoHow many days back to summarise, 1 to 90. Default 7.
watchNoAlso open a local page with charts (127.0.0.1, same token check as the other watch windows). The table is returned either way.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.40.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the description is not required to establish safety. It nonetheless adds real behavioral context the annotations cannot convey: the data is local-file sourced, it costs no quota, and no prompt, answer or raw error text is ever persisted, with AGENT_INTERN_NO_STATS=1 disabling recording. It stops short of describing freshness/persistence or failure modes when the local file is absent.

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 is front-loaded in the first clause, privacy and quota caveats trail as short supporting sentences. The long comma-separated content list is dense but every item is a genuine data category; the only minor waste is that list length slightly obscures the primary purpose sentence.

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, return structure need not be explained, and the description covers scope, cost, and privacy posture for a read-only stats tool. Remaining gaps, such as retention window semantics or behavior when no stats exist, are minor for a zero-required-parameter local query.

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 (days, watch) are documented in the schema, so the schema already carries parameter meaning. The description's 'per day and per week' hints at the time window but adds no format, bounds or interaction detail beyond what the schema states.

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?

'Show how the delegation tools have been used, from a local file' names a concrete verb and resource, then enumerates the exact contents (per-backend calls/errors/average seconds, per day/week, backend health, recent swarms and answer locations, token counts, Antigravity quota). This clearly separates it from the sibling ask/continue/status tools, which operate on a single backend.

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?

Usage is implied rather than stated: an agent can infer this is the reporting/observability surface used after running delegations, and 'Spends no quota' hints it is cheap to call. However there is no explicit when-to-use, when-not-to-use, or pointer to a sibling (e.g. per-backend status tools) for narrower queries.

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