Skip to main content
Glama

get_session_stats

Read-onlyIdempotent

Retrieve token savings stats for the current session, including per-tool call counts, reduction percentage, dedup savings, and latency metrics to monitor performance and cost efficiency.

Instructions

Token savings stats for this session: per-tool call counts, estimated token savings, reduction percentage, dedup savings, and per-tool latency (p50/p95/max/error_rate). Read-only. Returns JSON: { session: { ..., latency_per_tool }, cumulative, dedup_saved_tokens, report }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.3.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Addedv1.41.0
  3. Removedv1.38.0
  4. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior, so the description is not burdened with those disclosures. It adds valuable behavioral detail by specifying the returned JSON structure—session with latency_per_tool, cumulative, dedup_saved_tokens, and report—which is especially useful given there is no output 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?

The description is a single, front-loaded sentence that leads with the purpose and follows with a compact return layout. It contains no filler, though the inline JSON example is somewhat dense and could be slightly clearer as a structured list.

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?

For a no-parameter, read-only metrics tool, the description covers purpose, scope, and output shape adequately. It does not clarify how 'session' is defined or when a sibling analytics tool would be more appropriate, leaving a small but meaningful gap for an agent selecting among similar tools.

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?

There are zero parameters and the schema coverage is trivially complete, so the baseline is 4. The description reinforces that the tool is parameterless by scoping everything to 'this session,' but it does not need to add more parameter-level meaning.

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 identifies the resource ('this session') and the concrete purpose ('Token savings stats'), and enumerates the metrics returned: per-tool call counts, token savings, reduction percentage, dedup savings, and latency percentiles/error rate. It is clear and specific, but it does not explicitly distinguish itself from overlapping siblings like get_session_analytics.

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?

The phrase 'for this session' implies that the tool should be used when an agent wants token-savings metrics for the current session, which provides some usage context. However, the description gives no explicit guidance about when not to use it or how it compares to alternatives such as get_session_analytics, get_optimization_report, or get_real_savings.

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