Skip to main content
Glama

get_session_stats

Read-onlyIdempotent

Retrieve token savings, reduction percentage, dedup savings, and per-tool latency metrics for the current MCP session. Identifies where tokens were saved and tool performance.

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 }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  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 declare readOnlyHint, idempotentHint, and destructiveHint, so the description only needs to add non-safety behavior. It adds the return shape and key metrics (latency percentiles, cumulative, dedup_saved_tokens), which is meaningful since no output schema is present. No contradiction exists.

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 compact and front-loads the core purpose. The metric list is dense but informative, and the return shape is summarized efficiently. The 'Read-only' phrase is redundant with annotations but does not meaningfully hurt conciseness.

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 parameterless read-only stats tool, the description covers scope, metric contents, and return structure. The '...' inside the session object leaves some schema detail unspecified, but the description is still sufficient for an agent to call it correctly and understand what it returns.

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?

This tool takes zero parameters, so the description cannot add parameter-level meaning beyond the schema. The baseline of 4 applies because there are no parameters to document and no ambiguity for an agent.

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 clearly states the tool provides token savings stats for the current session, including per-tool call counts, savings, reduction percentage, dedup savings, and latency metrics. This is specific and not a tautology, though it does not explicitly distinguish itself from sibling tools like get_session_analytics or get_usage_trends.

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' provides useful context, implying use when current-session token savings statistics are needed. However, there is no explicit guidance about when not to use this tool or which sibling alternative to choose, especially given overlapping siblings like get_real_savings and get_session_analytics.

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/nikolai-vysotskyi/trace-mcp'

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