Skip to main content
Glama

page_wait_for

Waits for a CSS selector to become visible on a page, eliminating manual sleep delays. Returns true when found, false if timeout occurs.

Instructions

Wait until a CSS selector becomes visible on the page (replaces manual sleeps). Returns true if found, false on timeout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYes
selectorYesCSS selector to wait for.
session_idYes
timeout_msNoTimeout in milliseconds (default 10000).

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?

With no annotations provided, the description carries the behavioral burden. It explicitly says the tool waits for visibility, returns true when found, and returns false on timeout, which tells an agent the operation does not throw on a negative result. It does not specify polling behavior or the exact definition of visibility, but the core behavior is transparent.

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 short sentences deliver the core behavior and return contract with no filler. The main action is front-loaded and the timeout outcome is stated immediately after.

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 low-complexity wait utility, the description covers what the tool does, when it is useful, and what it returns on success and timeout. It omits edge-case behavior and relies on the schema for parameters, but nothing critical is missing for selecting and invoking it.

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 50%, with selector and timeout_ms described; page_id and session_id are left to convention. The description reinforces that the selector is the CSS selector being waited on but does not add meaning beyond the schema. This puts it at the baseline rather than adding parametric insight.

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 opens with a specific action and target: 'Wait until a CSS selector becomes visible on the page.' It also states the drop-in purpose ('replaces manual sleeps') and distinguishes this from the mutation-oriented sibling page tools by focusing on waiting rather than acting.

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 parenthetical 'replaces manual sleeps' gives clear context for when to use this tool instead of hard-coded delays. It does not explicitly name alternative tools or conditions to avoid using it, but the intended use case is reasonably clear.

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