Skip to main content
Glama
DustinTrap

kvm-pilot

by DustinTrap

wait_for_state

Read-only

Poll gates and screen until a target boot/run phase appears; returns the phase or last observed state on timeout.

Instructions

Wait (bounded) until the screen reaches a boot/run phase (read-only).

Server-side twin of CLI watch: polls cheap power/signal/boot-progress gates, then server-side vision, until phase (a classify_screen token; unknown tokens fail fast with the valid list) is observed. timeout is seconds, capped server-side at 300 — chain calls for longer waits. Success returns phase/confidence plus a frame_ref to pass to mouse as observed_frame_ref; a timeout returns reached=false with the last observed state (never a hang, never a raised error). With no server-side vision credentials only cheap-gate phases are waitable; others fail fast pointing at classify_screen polling. Holds the driver open up to timeout s. Details: doctrine topic 'interfaces'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNo
phaseYes
profileNo
timeoutNo
Behavior5/5

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

Beyond the readOnlyHint and destructiveHint annotations, it discloses that the tool holds the driver open, never hangs or raises on timeout, fails fast on unknown tokens, and has credential-dependent behavior. It also clarifies the return contract (success vs. `reached=false`), which is not visible in annotations. No contradiction with annotations is present.

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 dense and front-loaded with purpose, then layers mechanics, parameter semantics, edge cases, and credential constraints. It is longer than the two-sentence ideal but every sentence adds information; no fluff or repetition beyond a minor restatement of read-only near the end.

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?

With no output schema, the description fully covers the return contract, failure modes, timeout behavior, credentials scenario, and even points to a doctrine topic for details. It is complete for a tool with this complexity and provides all necessary context for an agent to invoke it correctly.

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

Parameters4/5

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

The description adds crucial meaning to `phase` (a classify_screen token, unknown tokens fail with the valid list) and `timeout` (seconds, capped at 300, chain for longer). It does not explain the optional `hint` and `profile` parameters, but coverage of the required parameter and the key timeout parameter is strong enough to compensate.

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 opens with a specific verb and resource: "Wait (bounded) until the screen reaches a boot/run phase (read-only)." It clearly distinguishes from siblings like classify_screen by explaining it polls until a target state is observed rather than capturing the current state. It also notes it is the server-side twin of CLI `watch`, further anchoring its unique purpose.

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 explicitly frames when to use this tool: for waiting on a phase, with `timeout` capped at 300 seconds and guidance to chain calls for longer waits. It also explains the alternative path when server-side vision credentials are missing, pointing to `classify_screen` polling. The `frame_ref` handoff to `mouse` is an actionable usage detail.

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/DustinTrap/kvm-pilot'

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