Skip to main content
Glama

session_stats

Aggregate oracle usage across all instances to find which agents burn the most calls. Returns turn counts by status, oracle, and agent, plus fresh vs. 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. Dates show when Glama detected each change.

  1. First observedv0.12.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations exist, so the description must carry the full burden. It discloses that the tool is read-only, makes no model call, aggregates across all instances, defaults to a 24-hour window, supports full-history via window_s:0, and returns specific metrics. This is excellent behavioral disclosure.

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?

The description is dense but every sentence carries useful information: scope, sibling distinction, time window, returned fields, project scoping, example use cases, and safety. The 'COORDINATION' prefix is slightly unnecessary but not harmful.

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?

For a read-only statistics tool with no output schema, the description covers parameters, semantics, return fields, default behavior, project/machine scope, and use cases. Nothing important for correct invocation 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 the baseline is 3. The description adds practical context by explaining what window_s:0 means, what all_projects:true does, and how defaults apply to project scope, going slightly beyond the schema field descriptions.

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?

Description clearly states a specific verb and resource: aggregated oracle usage across ALL instances on the machine. It also explicitly contrasts with the sibling `stats` tool, so an agent can distinguish them immediately.

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?

Provides explicit when-to-use guidance with example questions like 'which agents are burning the most oracle calls?' and 'how is the fleet doing today?'. It also names the alternative `stats` and explains the scoping condition that selects one over the other.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/baggybin/ask-fable'

If you have feedback or need assistance with the MCP directory API, please join our Discord server