Skip to main content
Glama

await_command

Poll a shell command periodically until it exits successfully (code 0), enabling waits for long-running operations like builds and deployments.

Instructions

Block agent execution until a shell command exits with code 0 (success). The command is polled at regular intervals. The agent is stuck on this call until done.

Exit code convention:

  • Exit 0: condition met → return success

  • Exit 2: condition failed → return failure

  • Any other code: still running → keep polling

Use this to wait for long-running operations: cloud builds, CI/CD, deployments, etc. Example: await_command(command="curl -sf https://ci.example.com/build/123/status | grep -q done", interval_seconds=30)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesShell command to check periodically. Exit 0 = success, exit 2 = failure, other = still running.
timeout_secondsNoMax wait time in seconds. Default 3600 (1 hour).
interval_secondsNoSeconds between checks. Default 30.
Behavior4/5

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

With no annotations, the description discloses key behavior: blocking, polling at intervals, and the exit-code meaning (0 success, 2 failure, others continue). It does not state what happens on timeout, but the timeout_seconds schema description implies a limit, which is a minor omission.

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?

The description is well-organized: a clear summary, typed exit-code bullets, a usage note, and an example. Every sentence earns its place, with no fluff or redundancy.

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 simple 3-parameter tool with no output schema, the description covers purpose, usage, exit semantics, and an example. It could mention timeout behavior, but the schema's 'max wait time' field and the overall clarity make this a solid, near-complete description.

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 baseline is 3. The description reiterates the exit-code convention already present in the command schema and provides an example using interval_seconds, but does not add deep new meaning beyond the schema.

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 states a clear action: 'Block agent execution until a shell command exits with code 0'. It specifies the resource (shell command) and distinguishes from sibling tools (await_url, await_file) by focusing on commands. The exit-code convention adds precise scope.

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 explicitly says 'Use this to wait for long-running operations: cloud builds, CI/CD, deployments, etc.' and gives a concrete example. It does not explicitly contrast with URL/file waiting, but the example and domain make the intended use clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adlternative/await-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server