Skip to main content
Glama

Read Debug Events

debug_events

Wait for ordered MI records and lifecycle events after a debug cursor, renew the client heartbeat, and return an error for stale cursors.

Instructions

Wait for ordered MI records and lifecycle events after a debug cursor; renews the client heartbeat. A stale cursor is an error, never silently skipped. Invalid UTF-8 MI values use explicit base64 objects.

Input Schema

NameRequiredDescriptionDefault
ownerYesSecret random capability, 32..128 characters; retain for retries and all calls. Never publish it in events.
cursorYesNext event cursor; begin at zero to include startup events.
debug_idYesOpaque debug_id returned by debug_start.
timeout_msNoWait duration 1..30000 ms; default 10000. Timeout is an error and does not end debugging.

Output Schema

NameRequiredDescriptionDefault
nextYes
eventsYes
statusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A3.9/5.0
Behavior4/5

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

The description usefully explains why annotations declare readOnlyHint=false on an event reader: it 'renews the client heartbeat,' a real side effect. It also discloses error semantics ('a stale cursor is an error, never silently skipped') and encoding behavior for invalid UTF-8 MI values, which the annotations cannot convey. Remaining gaps are minor given the schema covers timeout behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with no filler; the core wait behavior is front-loaded and each following clause adds a distinct contract (heartbeat, cursor errors, encoding).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a long-poll event reader with a full input schema and an output schema, this covers order guarantees, cursor lifecycle, side effects, and error behavior. The term 'MI' is left unexpanded, but everything needed to call the tool correctly is present.

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%, including cursor ordering, owner secrecy, and timeout bounds, so the schema already carries parameter meaning. The description only adds the ordering/staleness contract around cursor and the base64 rule for values, meeting the baseline but not exceeding 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?

The description gives a specific verb and resource ('Wait for ordered MI records and lifecycle events after a debug cursor'), which clearly separates this polling tool from siblings like debug_command, debug_start, and terminal_read_device_events. It never names those siblings explicitly, so the differentiation is implied rather than stated.

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?

Usage context is implied through the cursor contract ('after a debug cursor', stale cursor is an error), which tells an agent this is a sequential follow-up call rather than a one-shot read. There is no explicit statement of when to prefer this over debug_command or the terminal_* read/wait tools, nor any prerequisite beyond the cursor.

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