Skip to main content
Glama

wait_for_close

Read-onlyIdempotent

Wait for a target window or dialog to close, then return the surviving related root app state if a related selector is given.

Instructions

Wait for a target window/dialog to close. If related_to is provided, return the surviving related/root app state.

Input Schema

NameRequiredDescriptionDefault
appNoApp name, Hyprland class/title, pid, or address:0x... selector.
targetNoTarget window selector to wait for close, for example address:0x1234.
timeoutNoSeconds to wait. Defaults to 5; capped at 30.
related_toNoRoot app/window selector to return after the target closes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety/idempotency profile is covered. The description adds useful behavioral context: the conditional behavior of 'related_to' returning surviving root app state. It does not explain default return values or the blocking nature when the target never closes.

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?

Two tightly written sentences that front-load the core action before the conditional behavior. No filler or redundancy.

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?

There is no output schema, so the description carries the burden of explaining returns; it covers the related_to case but is silent on what is returned when related_to is omitted, and on what happens on timeout. Adequate but with a clear gap for a wait tool.

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?

Schema description coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema for 'related_to' by explaining its conditional effect on the return value (surviving related/root app state), which the schema text alone does not convey.

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?

States a specific verb ('wait for') and resource ('target window/dialog to close'), which distinguishes it from the sibling 'wait_for_window' (appearance) by implication. It is clear what the tool does, though it never explicitly names the sibling it contrasts with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No statement of when to use this versus 'wait', 'wait_for_window', or 'get_app_state'. The only conditional mentioned (related_to) describes behavior, not a usage decision, so the agent must infer the context from the name alone.

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