Skip to main content
Glama

wait_for_window

Waits until a window matching a title pattern appears, so automation can continue after an action opens a dialog or new window.

Instructions

Wait until a window matching title_pattern appears. Returns null on timeout. Useful after triggering an action that opens a dialog.

title_pattern is a case-insensitive substring (not a regex), matched against the listed name and every top-level window title, so a window title works on macOS (listed by process name) and Linux too.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "title_pattern": "<title_pattern>"
    },
    "name": "wait_for_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNo
title_patternYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations present, the description carries the full behavioral burden and does meaningful work: it discloses that a timeout is a null return rather than an error, and it explains the matching algorithm (case-insensitive substring, not regex) plus the cross-platform title-vs-process-name nuance. Gaps remain — it never states what is returned on success or what unit timeout is measured in, so an agent cannot fully predict the result shape.

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?

Front-loaded with the core behavior and return-on-timeout, then the usage hint, then parameter detail — a sensible order with no filler. The final sentence is somewhat run-on ('matched against the listed name and every top-level window title, so a window title works on macOS (listed by process name) and Linux too'), packing three ideas into one clause, but each idea is load-bearing.

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 two-parameter tool with no annotations and no output schema, the description covers the two things an agent most needs: matching semantics and timeout outcome. The remaining omission is the success return value and the timeout unit, which matters because there is no output schema to fall back on.

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 0%, so the description must supply parameter meaning, and it does so well for title_pattern: substring not regex, case-insensitive, matched against both the listed name and every top-level window title. The timeout parameter is left entirely unexplained — no unit, no blocking/polling behavior — which is the one real hole in an otherwise strong parameter explanation.

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 specific verb and resource — 'Wait until a window matching title_pattern appears' — and immediately pins down the scope as windows rather than elements, which is the key distinction from wait_for_element. The 'Returns null on timeout' clause further defines what the call actually does end-to-end.

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 gives an explicit trigger condition: 'Useful after triggering an action that opens a dialog.' That tells the agent when this tool belongs in a sequence. It stops short of naming a when-not case or pointing at a specific alternative (e.g. wait_for_element for in-window UI), so the routing guidance is clear but not exhaustive.

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