Skip to main content
Glama

close_stream

Closes an observation window opened by observe_stream, terminating the remote stream process and releasing channel resources to prevent residual processes. Returns window_id and closed status.

Instructions

关闭由 observe_stream 打开的本地观察窗,确认终止并回收对应的远端观察流进程与通道资源,返回 { window_id, closed: true }。观察完成后应及时调用以防残留流进程;若 window_id 不存在或已关闭则报错(不影响其他观察窗)。

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": "close_stream"
  }
}

Input Schema

NameRequiredDescriptionDefault
window_idYes由 observe_stream 返回的观察窗 ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / window_id / description
      Added value: +"由 observe_stream 返回的观察窗 ID"
    • addedInput schema / properties / window_id / minLength
      Added value: +1
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses the destructive side effects (terminating the remote stream process and reclaiming channel resources), the exact success payload, and the non-idempotent error on an already-closed window; however it says nothing about permissions, whether partial cleanup can occur, or what the error response looks like, so meaningful behavioral gaps remain.

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?

Two sentences, front-loaded with the action and its scope, then the return value, then the recommended timing, then the error case — every clause earns its place with no filler.

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?

For a one-parameter close/teardown tool with no output schema, the description supplies the return shape, the cleanup semantics, and the error condition, which is enough to call it correctly. Only the absence of permission or failure-mode detail keeps it from being fully complete.

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?

There is a single parameter with 100% schema coverage, and the description adds nothing beyond the schema's own note that `window_id` comes from `observe_stream`. Baseline 3 applies when the schema already documents the parameter fully.

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 description gives a specific verb and resource ('关闭…本地观察窗' / close the local observation window) and anchors it to the tool that created the window (`observe_stream`), while naming the exact return payload `{ window_id, closed: true }`. An agent can distinguish this from `observe_stream` without opening either schema.

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?

It states a clear trigger — call promptly after observation is complete, to avoid leftover stream processes — and defines the failure condition (window_id missing or already closed raises an error without affecting other windows). It stops short of explicitly contrasting with other terminal siblings such as `stop_and_verify`, so it is strong context rather than a full when/when-not map.

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