Skip to main content
Glama

midscene_aiWaitFor

Monitor web pages using AI to wait for specified conditions described in natural language, automating test flows by polling until assertions become true.

Instructions

Waits until a specified condition, described in natural language, becomes true on the page. Polls the condition using AI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assertionYesCondition to monitor on the page, described in natural language.
timeoutMsNoMaximum time to wait (ms). Default: 15000
checkIntervalMsNoHow often to check the condition (ms). Default: 3000
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: waiting until a condition becomes true, polling with AI, and the tool's reactive nature. However, it does not mention error handling (e.g., what happens if timeout is reached), performance impact of polling, or specific AI model details, leaving some gaps in behavioral understanding.

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 extremely concise (two sentences) and front-loaded with the core purpose. Every sentence earns its place: the first defines the action and condition, the second adds critical behavioral context (AI polling). There is no wasted text 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?

Given no annotations, no output schema, and a tool that performs AI-based polling (moderate complexity), the description is minimally adequate. It covers the purpose and basic behavior but lacks details on return values, error cases, or integration with sibling tools. It meets the minimum viable threshold but has clear gaps for a tool with dynamic behavior.

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 description coverage is 100%, providing full documentation for all parameters (assertion, timeoutMs, checkIntervalMs). The description adds no additional parameter semantics beyond what the schema already states (e.g., natural language condition, polling intervals). Baseline 3 is appropriate as the schema does the heavy lifting.

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 with specific verbs ('waits until', 'polls') and resource ('condition on the page'), distinguishing it from siblings like midscene_aiAssert (which likely asserts immediately) or midscene_navigate (which changes page location). It explicitly mentions AI-based polling, which is unique among the listed tools.

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?

The description implies usage for waiting on dynamic page conditions, but does not explicitly state when to use it versus alternatives like midscene_aiAssert (for immediate checks) or other waiting mechanisms. It provides clear context (monitoring page conditions) but lacks explicit exclusions or named alternatives.

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/MauroCor/mcp-midscene'

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