Skip to main content
Glama

session_stats

Read-onlyIdempotent

Aggregate oracle usage across all local agents and projects to see which agents call oracles most, how the fleet is doing today, and fresh versus total sessions.

Instructions

COORDINATION — aggregated oracle usage across ALL instances on this machine (unlike stats, which only sees the current instance's audit log). Turn counts (by status/oracle/agent) default to the last 24h (window_s: 86400); pass window_s: 0 for all retained history. Also returns fresh_sessions (heartbeat within the stale window) vs total_sessions, plus attributed_turns / unknown_turns. Defaults to this project; all_projects: true for the whole machine. Use it to answer 'which agents are burning the most oracle calls?' or 'how is the fleet doing today?'. Read-only, makes no model call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
window_sNoOnly count turns from the last N seconds. Default 86400 (24h). Pass 0 for all retained history.
all_projectsNoAggregate across all projects on this machine, not just the current one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotent/destructive=false, so 'Read-only, makes no model call' largely restates structured data. However, the description adds real behavioral context the annotations don't cover: the default 24h window, the `window_s: 0` escape hatch, the all-projects scope, and the returned breakdowns (`fresh_sessions` vs `total_sessions`, `attributed_turns`/`unknown_turns`).

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?

Dense but front-loaded: the coordination scope and the sibling distinction come first, then defaults, then returned fields, then use cases. Every clause carries information, though it is a long single paragraph rather than crisply segmented.

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?

No output schema exists, and the description compensates by enumerating what the tool returns (turn counts by status/oracle/agent, fresh vs total sessions, attributed/unknown turns). Combined with the scope and window semantics, an agent has everything needed to call it correctly.

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 coverage is 100% and both parameters are fully documented in the schema, including the `window_s: 0` semantics. The description's param notes largely duplicate the schema text, so this is the baseline 3 rather than added value.

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+scope ('aggregated oracle usage across ALL instances on this machine') and explicitly contrasts itself with the sibling `stats`, which only sees the current instance's audit log. An agent can distinguish the two without opening either schema.

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 when to use it (vs `stats`), names the concrete questions it answers ('which agents are burning the most oracle calls?', 'how is the fleet doing today?'), and gives the two modes via `all_projects`. Nothing is left to inference.

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