Skip to main content
Glama
gashcrumb

nested-display-mcp

by gashcrumb

Wait for a window

wait_for_window

Waits until a window matching a title, app_id, or class regex exists, then returns it. Use it to block until an expected GUI window appears before taking screenshots or sending input.

Instructions

Waits until a window whose title, app_id or class matches the regex exists. Returns the window.

Input Schema

NameRequiredDescriptionDefault
idNoDisplay id from display_open. Optional when exactly one display is open.
patternYes
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden, and it does disclose that the tool blocks until a matching window exists and then returns that window. It does not explain timeout behavior, what happens if no window appears, or how multiple matches are resolved. Those omissions keep it at minimum viable transparency rather than strong disclosure.

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 two compact sentences with the primary behavior front-loaded. Every clause adds useful information about matching and return behavior, with no repetition or filler.

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

Completeness3/5

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

For a wait tool with no annotations and no output schema, the description covers the core matching fields and return value. It still omits critical context such as timeout behavior, error behavior when the regex never matches, and whether multiple windows can match. This is adequate but not complete for reliable invocation in edge cases.

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 only 33%, so the description needs to compensate. It does explain pattern semantics by stating that the regex matches title, app_id, or class, while id is covered by the schema. However, timeout_ms is not described in either place, so parameter semantics remain partially incomplete.

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 states a specific verb and resource: it waits for a window matching a regex and returns it. It also names the three matchable fields, title, app_id, and class, so it is more specific than a generic wait. Sibling differentiation is mostly implied rather than explicit, since it does not directly contrast with windows, wait, or focus.

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?

Usage is implied by the condition "until ... exists," which suggests calling it when a window may not yet be present. However, it does not explicitly say when to prefer it over windows, wait, or focus, and it gives no exclusions or prerequisites. This is adequate but leaves routing to the agent's inference.

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