Skip to main content
Glama

pmux_agent_wait_ready

Poll a tab until an LLM agent is ready, detecting states like starting, busy, failed, or exited. Supports boot verification with completion evidence for reliable orchestration.

Instructions

Primary agent orchestration tool: poll a tab until an agent is ready, still starting/busy, launch_failed, exited, or timeout. Use pmux_send_input/pmux_capture_pane only as low-level fallbacks. agent_busy is non-terminal and keeps polling. Boot verification (recommended after pmux_agent_start): pass {bootId, expectEcho:true} — agent_ready is then returned ONLY on the bootstrap DONE marker (completion evidence; supersedes ready heuristics, requireBusyTransition and runtimeError), and every response carries boot.fileSeen (SessionStart boot-signal file — diagnostic only; on echo timeout, fileSeen:false suggests launch/hook-trust failure while fileSeen:true suggests the model never answered). Default timeout rises to 90s under expectEcho. requireBusyTransition defaults false for boot readiness; set true when waiting after send so ready is returned only after busy was observed or an initial non-ready baseline later changes to ready. In boot mode only (and never under expectEcho), pane fallback input_queued can be treated as a composer placeholder and returned ready; send validation remains strict. Uses pane capture + tab_status only; no server-side registry is kept. Session lifetime contract: keep the tab open until the task is finished, then close it with pmux_close_tab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdYesTarget tab id (from pmux_list_tabs / pmux_create_tab).
bootIdNobootId returned by pmux_agent_start. When set, every response includes boot.fileSeen (SessionStart boot-signal file existence — diagnostic only, never gates readiness).
pollMsNoPolling interval in ms. Defaults to 1500; minimum 500.
providerYes
timeoutMsNoTotal polling timeout in ms. Defaults to 30000 (90000 when expectEcho is true); max 180000.
expectEchoNoRequires bootId, and is only meaningful when the agent was STARTED with bootstrapEcho:true (the default) — with bootstrapEcho:false no echo will ever arrive and this would time out. When true, agent_ready is returned ONLY once the bootstrap-echo DONE marker (req=bootId) is on the pane — evidence-based boot readiness that supersedes ready-pattern heuristics and requireBusyTransition.
busyPatternNobusyPattern regex override. Max 200 chars; compile errors become ToolError.
workspaceIdYesTarget workspace id (from pmux_list_workspaces).
errorPatternNoerrorPattern regex override. Max 200 chars; compile errors become ToolError.
readyPatternNoreadyPattern regex override. Max 200 chars; compile errors become ToolError.
runtimeErrorPatternNoruntimeErrorPattern regex override. Max 200 chars; compile errors become ToolError.
requireBusyTransitionNoDefaults false for boot readiness. Set true when waiting after send; ready is returned only after a busy state has been observed. Superseded by expectEcho (the DONE marker is itself completion evidence).
Behavior5/5

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

With no annotations provided, the description fully covers behavioral traits: it explains the polling mechanism (pane capture + tab_status, no server-side registry), non-terminal states (agent_busy keeps polling), boot mode details, echo behavior, and session lifetime contract. All relevant behaviors are disclosed.

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 and front-loaded with the core purpose, but it is somewhat verbose with multiple clauses and parentheticals. Some phrases like 'supersedes ready heuristics, requireBusyTransition and runtimeError' are dense but still add value. Minor trimming could improve readability without losing content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 12 parameters and no output schema, the description is remarkably complete. It covers all return states (agent_ready, still starting, etc.), explains the boot.fileSeen diagnostic field in responses, and even provides a session lifetime contract. No gaps remain for understanding tool behavior.

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?

Despite high schema coverage (92%), the description adds significant meaning beyond parameter descriptions. For example, it explains that expectEcho requires bootId and is only meaningful with bootstrapEcho:true, that timeoutMs defaults to 90000 when expectEcho is true, and that requireBusyTransition behaves differently for boot vs. after-send scenarios.

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 clearly states the tool's purpose: 'poll a tab until an agent is ready, still starting/busy, launch_failed, exited, or timeout.' It distinguishes itself from sibling tools like pmux_send_input and pmux_capture_pane by calling them low-level fallbacks, establishing this as the primary orchestration tool.

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?

The description provides explicit guidance on when to use this tool (e.g., for boot verification after pmux_agent_start) and when to use alternatives (pmux_send_input/pmux_capture_pane as low-level fallbacks). It also explains parameter defaults and conditions like requireBusyTransition for different scenarios.

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/yoway030/purplemux-mcp'

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