Skip to main content
Glama

session_wait

Waits for a busy session to become idle or time out, then returns new messages and whether a user answer is pending.

Instructions

轮询到 busy 变 false 或超时(默认 120s,上限 600s),返回这期间的新消息(全文)与是否在等用户回答。用户从前端 stop/插话时如实返回,不自动续发。

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": {
      "sessionId": "<sessionId>"
    },
    "name": "session_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo每次轮询取多少条(默认 50)
sessionIdYesBridge 会话 ID(必须是本连接器登记册内的会话;session_adopt 是唯一接管入口)
timeoutMsNo默认 120000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the polling/long-wait semantics, default 120s and hard cap 600s, the return payload, and the important behavioral fact that a frontend stop/interjection is reported as-is with no automatic continuation. Remaining gaps are secondary (what the response looks like on timeout, whether the call blocks the connection).

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 dense sentences front-loaded with the terminating condition and payload, then the edge-case behavior. No filler wording, and each clause adds operational information.

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 must describe returns, which it does (new messages in full text plus whether a user answer is pending). Combined with full schema coverage this is nearly complete, missing only timeout-failure return shape.

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 100%, so the schema already documents sessionId, limit and timeoutMs, and the description's timeout defaults (120s/600s) merely restate the schema's values. It adds no new meaning for limit and no format details beyond the structured fields, so baseline 3 applies.

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 verb (poll) and resource (session), plus the terminating condition (busy becomes false or timeout) and what is returned (new messages in full text, whether the user is being waited on). An agent can tell it is a blocking wait rather than a plain read, though it never names session_read/session_send explicitly.

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 is implied rather than stated: you poll when you need to wait for the session to become idle and collect intervening messages, and the note that it does not auto-continue sends hints at the boundary with session_send. There is no explicit 'use X instead when Y' or exclusion for when a simple read suffices.

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