Skip to main content
Glama

wait

Wait for an execution to finish, or get its current status after a timeout; returns full output when completed.

Instructions

等待一个 execution 结束,或在指定时限到达时返回其当前状态。

选择与等待

execution 的选择规则与 execution_status 相同。等待 到期只结束本次工具调用,不中断 Python cell。后续可再次调用本工具, 或用 read_output 查看已到达的输出。

完整输出交付

当所选 execution 的原始 run_cell 请求含有效 --full-output 且已达到 终态时,本工具直接返回完整 combined 正文,不应用默认 5,000-token 省略。该策略仅保留为 private runtime state;仍在运行的 execution 继续 返回 running,而非不完整正文。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
executionNo要等待的正整数执行编号。省略时使用当前记录,随后 使用最近记录。
timeout_secondsNo本次调用最多等待的正数秒数;默认 30 秒。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.13

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses key behavioral traits: it waits for completion or timeout, does not interrupt the cell, can be called again, and returns full output under certain conditions. Without annotations, this is good transparency, though it could mention potential side effects or error cases.

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?

The description is well-structured with sections, but it contains some redundancy, particularly the 'full output delivery' section which repeats similar wording about full-output and 5,000-token omission. Still, it's relatively concise and organized.

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?

Given the simple tool with two parameters, the description covers the main aspects: what it does, selection rules, timeout behavior, and output handling. No output schema exists, so return value details are not required. It's complete enough for an agent to use correctly.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters (execution and timeout_seconds) are described in the schema with default values and meanings. The description adds context about selection rules and timeout behavior, fully complementing the schema's 100% coverage.

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?

The description clearly states the tool waits for an execution to finish or returns its current status after a timeout. It names the specific resource (execution) and the action (wait/return status), though it doesn't explicitly contrast with sibling tools like execution_status, which is a minor gap.

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 explains when to use the tool: to wait for an execution, and mentions that timeout doesn't interrupt the Python cell. It also references read_output as an alternative for viewing output later. However, it doesn't explicitly say when to prefer this over execution_status or other siblings, though the context is implied.

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