Skip to main content
Glama

read_stream

Read frames from local observation windows: recent frames, before_seq backward paging, window_ms lookback, or since_seq continuation. Continue via last_delivered_seq; gap marks lost cursor ranges.

Instructions

读取本地观察窗。可读最近帧、按 before_seq 向前翻页、按 window_ms 回看或按 since_seq 续读。每次续读用 last_delivered_seq,gap 表示游标区间有丢失。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "window_id": "<window_id>"
    },
    "name": "read_stream"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo最多返回帧数,缺省 20
wait_msNo续读等待新增帧的毫秒数,仅用于 since_seq
since_seqNo读取此序号之后的帧
window_idYes
window_msNo回看最近多少毫秒
before_seqNo读取此序号之前最近的帧

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose non-obvious behavior: continuation reads should chain from last_delivered_seq, and a gap in the result signals lost frames in the cursor range. Beyond that it is silent on error conditions, frame ordering, and whether reading a window has side effects on the stream.

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 dense sentences with no filler, front-loading the resource before the mode list. The trailing clause about last_delivered_seq and gap is useful but forward-references a field the definition never defines, costing a little clarity.

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

Completeness3/5

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

A six-parameter read tool with no annotations and no output schema needs its description to cover return semantics; it touches gap and cursor chaining but never describes the frame structure or error behavior. Adequate for usage, thin for interpretation of results.

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 coverage is 83%, so the schema already documents limit, wait_ms, since_seq, window_ms, and before_seq. The description restates their purposes rather than adding format or interaction detail, and it references last_delivered_seq, which appears in neither the schema nor a defined output, making that hint slightly ambiguous.

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 concrete verb and resource (读取本地观察窗) and enumerates the four read modes (recent frames, before_seq paging, window_ms lookback, since_seq continuation), so an agent can tell what the tool retrieves. It does not, however, distinguish itself from the sibling observe_stream, leaving the read-vs-observe split implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The four modes are laid out with the parameter that selects each, which gives the agent clear conditions for choosing a read pattern. What is missing is any exclusion or named alternative — nothing says when to use this instead of observe_stream or how it relates to close_stream.

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