Skip to main content
Glama

等待实时事件

events_wait

Wait for matching real-time browser events, returning immediately when available or after a timeout. Use the previous cursor to resume without missing or duplicating events.

Instructions

长轮询:等到有匹配的实时事件就立刻返回,最多等待 timeoutMs(默认 15 秒,上限 120 秒)。传入上次返回的 cursor 就不会漏也不会重。这是任何客户端都能用的实时消费方式。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
minNo至少攒够几条才返回,默认 1
limitNo本次最多返回多少条,默认 50
cursorNo上次消费到的游标位置
timeoutMsNo最长等待毫秒数,默认 15000
subscriptionIdYesevents_subscribe 返回的订阅 ID
includeFrameDataNo画面帧事件是否包含 base64 数据,默认 false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the blocking long-poll semantics, immediate return on match, the timeout default of 15s and the 120s ceiling. It stops short of stating what happens on timeout (empty result vs error), which would be the last useful behavioral detail.

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 compact clauses with zero filler, front-loaded with the mechanism, then the timeout bound, then cursor semantics. Every sentence earns its place.

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?

No output schema exists, so the description should hint at returns; it partially does via 'the cursor returned last time', implying a cursor in the response. It does not describe the event payload shape or the timeout-return behavior, leaving a modest gap for a polling tool.

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 coverage is 100%, so the schema already documents all six parameters and the baseline is 3. The description adds value beyond the schema by noting the 120s cap on timeoutMs (schema only lists the 15000 default) and by explaining the no-loss/no-duplicate guarantee of cursor resumption.

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 mechanism and resource: long-polling wait for matching real-time events, returning immediately on arrival. Clear verb+resource, but it does not explicitly contrast itself with the sibling events_read, which an agent must choose between.

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 '这是任何客户端都能用的实时消费方式' implies a general-purpose consumption path, and cursor handling hints at sequential polling, but the description never states when to prefer this over events_read or events_list. Usage is implied rather than spelled out.

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