Skip to main content
Glama

session_stats

Read-only

Retrieves live counters for open serial connections—port, framing, buffered/dropped bytes, RX/TX totals, capture status, and errors—so you can monitor health; pass session_id for one or omit for all.

Instructions

Live counters for open sessions: port, framing, opened_ms, buffered/dropped bytes, chunks seen, rx/tx byte totals, last_rx_ms, the transport settings the port was opened with, the active capture (path and live counters), and the session error when the port died. Pass session_id for one session; default is all.

Input Schema

NameRequiredDescriptionDefault
session_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.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=true, openWorldHint=true and destructiveHint=false, so the safety profile is covered. Beyond that, the description usefully discloses that counters are live, that the transport settings the port was opened with are included, and that the session error is surfaced when the port died — real behavioral context not present in structured fields.

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?

One long but front-loaded sentence: the resource and scope come first, the field enumeration second, and the session_id guidance last. It is dense but every clause names actual returned data, so little is wasted; a minor readability cost from the run-on list structure.

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 must explain return values, and it does by enumerating the counters, capture info and error field. Combined with the default-scope rule and the annotations covering safety, an agent has enough to invoke it correctly; only the treatment of non-open/unknown sessions is left implicit.

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 schema documents nothing for session_id (0% coverage), so the description carries the burden and does so: it states that passing session_id scopes to one session and that omitting it defaults to all sessions. That is exactly the semantics the agent needs, though it doesn't clarify id format or behavior for an unknown/closed id.

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 opens with a concrete noun phrase, 'Live counters for open sessions', and then enumerates exactly which counters are reported, so an agent knows precisely what this returns. It is distinguishable from sibling tools like session_timeline or list_ports, though it never explicitly names a sibling it is not.

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 sentence 'Pass session_id for one session; default is all' gives clear operational context for scoping the call, which is genuine usage guidance. However, there is no when-to-use vs. when-not-to-use framing and no mention of the sibling tools (session_timeline, list_ports) that an agent might confuse it with.

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