Skip to main content
Glama

get_session_stats

Read-only

Monitor current session performance: returns per-tool latency and total tokens saved, helping agents track documentation navigation efficiency without brute-force file reads.

Instructions

Session self-monitor: returns {latency_per_tool, total_tokens_saved (modeled: file bytes avoided minus bytes served; searches earn none)}. Lightweight; reads the in-memory latency ring + persistent savings counter. For windowed analysis use analyze_perf. The latency ring lives in memory, so a server restart clears it.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.120.0
  2. Removedv1.99.0
  3. First observedv1.66.3

TDQS

A4.5/5.0
Behavior5/5

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

With readOnlyHint already covering safety, the description adds real behavioral context: the savings counter is modeled (file bytes avoided minus bytes served; searches earn none) and the latency ring is volatile, cleared by a server restart. These are non-obvious traits an agent could not derive from the annotations or empty schema.

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?

Three sentences, front-loaded with the return contract before the operational caveats, and every sentence carries information. The inline JSON-ish field list is slightly dense but is the most load-bearing part of the description.

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?

There is no output schema, so the description correctly carries the return-value burden by naming both fields and explaining how total_tokens_saved is computed. Minor gaps remain (units/format for latency_per_tool, whether the counter is cumulative per session), but for a zero-parameter read tool this is nearly complete.

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?

The tool takes zero parameters, so the baseline is 4 and there is no schema surface for the description to elaborate on. The description's inline return-shape detail is useful but belongs to output rather than parameter semantics.

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?

The description opens with a specific verb+resource ('Session self-monitor: returns...') and immediately enumerates the returned fields, so an agent knows exactly what comes back. It explicitly names the sibling it is not (analyze_perf), which removes ambiguity among a large set of stats tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It routes windowed analysis to analyze_perf, giving a concrete condition for choosing the alternative. It also flags the tool's lightweight/in-memory nature, though it does not spell out an explicit 'when not to use' beyond the analyze_perf redirect.

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