Skip to main content
Glama

Read Session Events

terminal_session_events
Read-only

Read retained structured session events or wait for newer events from a cursor to monitor session activity without receiving terminal output bytes.

Instructions

Read retained structured Session events, or wait for events after an event cursor. Events never include terminal output bytes.

Input Schema

NameRequiredDescriptionDefault
cursorNoOptional next event cursor; when set, wait for newer events.
max_eventsNoMaximum number of Session events to return.
session_idYesActive Session ID or short reference.
timeout_msNoOptional wait timeout in milliseconds when cursor is supplied; maximum 86400000.

Output Schema

NameRequiredDescriptionDefault
nextYes
eventsYes
droppedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already establish this as a read-only operation, so the description's main added value is the payload boundary: events never include terminal output bytes. It does not disclose ordering, retention window, whether the wait blocks until timeout, or what happens when the cursor is stale relative to the non-idempotent hint, leaving notable gaps.

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?

Two short sentences with the core read behavior front-loaded and the payload exclusion stated immediately after. No filler, though the wait mode is compressed enough to be slightly ambiguous about blocking semantics.

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?

With an output schema present and full parameter coverage, the description only needs to frame intent and scope, which it does. The remaining gap is the wait/blocking behavior and cursor lifecycle, which matter for a non-idempotent read-with-wait tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters including cursor, max_events, timeout_ms, and session_id are already documented in the schema. The description only restates the cursor→wait relationship the schema already spells out, adding no format, range, or default detail beyond it.

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?

States a specific verb and resource: reading retained structured Session events, with an optional wait mode keyed on a cursor. The explicit exclusion of terminal output bytes helps distinguish it from terminal_read, though it doesn't name the similarly-named siblings like terminal_read_activity or terminal_read_device_events.

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 'or wait for events after an event cursor' clause implies two usage modes (drain vs. block/wait), which is useful selection context without saying so explicitly. It never names alternatives such as terminal_wait_activity or terminal_read_activity, so the agent must infer which read surface to pick.

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