Skip to main content
Glama

Wait For Session

exec_wait
Read-onlyIdempotent

Block until a remote command session exits or a timeout elapses, then return new stdout and stderr output from given byte offsets.

Instructions

Block until the session exits or timeout elapses (default 30s, max 300s). Returns the exec_poll payload with deltas from the given offsets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNoMax seconds to wait (1..300, default 30).
session_idYesPositive id from exec_start.
stderr_offsetNoStderr byte offset to resume from (default 0).
stdout_offsetNoStdout byte offset to resume from (default 0).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
doneNo
errorNo
stderrNo
stdoutNo
exit_codeNo
duration_msNo
duration_usNo
stderr_offsetNo
stdout_offsetNo
truncated_stderrNo
truncated_stdoutNo

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?

Annotations already cover readOnly, idempotent, and non-destructive traits, so the description adds real value by disclosing blocking semantics, timeout bounds, and that the response is an exec_poll payload containing deltas relative to the supplied offsets. It does not describe behavior on session-not-found or timeout expiry, but the core blocking behavior is well conveyed.

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, zero waste, with the blocking contract and timeout bounds front-loaded and the return shape following. Nothing redundant or padded.

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?

With an output schema present, the description need not detail return values, and it correctly focuses on blocking behavior and timing. The only omission is guidance on which sibling to choose for non-blocking reads, a minor gap for a well-annotated read tool.

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 description coverage is 100%, so all four parameters are already documented in the schema, including defaults and ranges. The description adds only a mild framing benefit by explaining that offsets produce deltas rather than absolute output, so the 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 and resource: blocks until the session exits or the timeout elapses, and frames the return as the exec_poll payload with offset deltas. This clearly separates it from siblings like exec_poll, though the contrast is implied rather than stated.

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 blocking-versus-timeout framing implies when to use it (wait for completion), and referencing exec_poll's payload hints at the relationship to the polling sibling. However, it never says when to prefer exec_poll, exec_kill, or exec_close instead, leaving the exclusion to inference.

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