Skip to main content
Glama

poll_events

Retrieve new events recorded by watches and hooks since a sequence number, with optional label filtering and clearing.

Instructions

Drain events recorded by watches and hooks. Read-only.

since is a sequence number, exclusive: pass back the next from the previous call to get only what is new. label filters to one stream. clear=True drops the returned rows.

Returns {events, next, dropped, buffered}. Each row is {seq, t, label, kind} plus, for a watch, {path, before, after}, and for a hook, {fn, self, args}. The buffer holds 2000 events across all streams; dropped counts what the cap evicted before you read it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNo
labelNo
limitNo
sinceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations available, the description carries the full burden and handles it well: it declares read-only behavior, explains clear semantics, discloses the 2000-event buffer cap, and defines what dropped counts. It also provides the exact return shape and row fields, which is especially valuable given 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.

Conciseness5/5

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

The description is compact and front-loaded: purpose and safety first, then parameter semantics, then return contract. Every sentence carries essential information, with no filler or repetition of schema titles.

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?

The description is nearly complete for an event-polling tool: it covers return values, row shapes, buffer behavior, and the incremental polling pattern. The main gap is the undocumented limit parameter, and there is no explicit statement of what happens when the buffer cap is approached beyond the dropped count.

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?

Schema description coverage is 0%, so the description must compensate. It does explain since (exclusive sequence number), label (single-stream filter), and clear (drops returned rows), but it does not explain the limit parameter or its relationship to the 2000-event buffer. This is a meaningful omission.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line 'Drain events recorded by watches and hooks' names a specific verb, a clear resource, and the source of events. This distinguishes it from siblings like watch_property or stop_stream by framing it as the consumption side of the watch/hook lifecycle.

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 description implies usage through the polling pattern ('pass back the next from the previous call') and the note that label filters to one stream. However, it never explicitly says when to choose this tool over siblings like list_streams or stop_stream, nor does it state exclusions.

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