Skip to main content
Glama

wait_for

Read-onlyIdempotent

Wait for text or a selector to appear, then retrieve the current page state with element stamps. Ensures dynamic content is ready before capturing.

Instructions

Wait until text or a selector appears, then report the page like page_state (element stamps included).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
selectorNo
timeout_msNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety. The description adds behavioral context: it waits for a condition and then reports page state including element stamps. It does not mention timeout failure behavior, but the annotations cover the non-destructive nature. This adds value beyond the annotations.

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 a single sentence that is front-loaded with the core action. It is concise, efficient, and contains no filler. Every part adds value.

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?

There is an output schema present, so return values need not be described. The description covers the main behavior (waiting and reporting) and references page_state for context. It does not detail what happens on timeout or if no condition is provided, but these are edge cases that an agent could infer from the parameters and general browser automation knowledge. Overall, it is sufficiently complete for typical use.

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 0%, so the description must compensate. It explains 'text' and 'selector' as conditions to wait for, but does not mention the timeout_ms parameter at all. The description gives partial parameter meaning but misses the timeout, which is a significant gap given the lack of schema descriptions.

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 (wait) and resource (page state), and clearly distinguishes itself from page_state by noting it waits first. It also mentions 'element stamps' which adds specificity about the output content. This is not a tautology and provides a clear purpose.

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: use this tool when you need to wait for a text or selector before getting a page snapshot, as opposed to page_state which reports immediately. It references page_state as a comparison, giving a sense of when to use this over the sibling. However, it does not explicitly state exclusions or alternative tools for other conditions.

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