Skip to main content
Glama

wait_session

Blocks until a Claude Code session finishes or the timeout expires, returning its current status; if timedOut is true, call again to keep waiting.

Instructions

Block until a session stops working or timeoutMs passes (default and maximum: the server wait limit, 25000 unless configured). Returns the same view as get_session without the title and prompt. timedOut true means it is still working: call again. Use it after new_session, after send_followup returns started or handed, and after an answer.

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

Input Schema

NameRequiredDescriptionDefault
detailNo
sessionIdYes
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/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 mostly succeeds: it discloses that the call blocks, that the default and maximum timeout is the server wait limit (25000 unless configured), and what the return payload contains relative to get_session. The stated 25000 cap conflicts with the schema's maximum of 95000, leaving ambiguity about which limit applies, and there is no mention of what happens for an unknown or finished sessionId.

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?

Three dense sentences with the blocking behavior and timeout constraint front-loaded, and no filler. Some of the phrasing is heavily compressed (e.g. 'after send_followup returns started or handed'), which is efficient but slightly terse for an unfamiliar reader.

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?

There is no output schema, and the description compensates by defining the return as a get_session view plus the timedOut flag. Remaining gaps are the documented-vs-schema timeout maximum mismatch and the undefined 'detail' parameter, but for a three-parameter polling tool this is close to complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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 explains timeoutMs (default and maximum) reasonably, but sessionId is only implicitly covered through the sibling-tool references, and the 'detail' enum (brief/full) is never mentioned at all — an agent has no basis to choose between those modes.

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?

States a specific verb and behavior — block until the session stops working or timeoutMs elapses — and anchors the result to a known sibling ('same view as get_session without the title and prompt'). An agent can distinguish this polling/wait tool from get_session 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 Guidelines5/5

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

Gives explicit triggering conditions: after new_session, after send_followup returns started or handed, and after an answer. It also closes the loop on the return value ('timedOut true means it is still working: call again'), which is exactly the when-to-call-again guidance a wait tool needs.

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