Skip to main content
Glama

wait_for_page

Pause until a page's URL or title matches given conditions, useful after logins, redirects, or route changes. Returns the final URL and title.

Instructions

Wait until the current page's URL or title meets a condition: URL contains text, URL matches a regular expression, and/or title contains text (all given conditions must hold). Use after an action that navigates or redirects (submitting a login form, clicking a link, a single-page-app route change) before checking the new page. Returns the final URL and title; on timeout, the error shows the URL and title the page actually had. To wait for an element to appear, use wait_for_element instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutMsNoHow long to wait, in milliseconds (default 10000, max 60000).
urlMatchesNoWait until the URL matches this JavaScript regular expression, e.g. '/orders/[0-9]+$'.
urlContainsNoWait until the URL contains this text, e.g. '/dashboard' or 'checkout-step-two'.
titleContainsNoWait until the page title contains this text (case-sensitive), e.g. 'Dashboard'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations, so the description carries full burden and does well: it discloses return behavior (final URL and title), timeout error content (the URL/title actually observed), and combined-condition semantics. Left implicit are the default/max timeout bounds (in schema) and blocking nature, so not quite a 5.

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?

Three tight sentences: purpose/conditions first, usage context second, return/timeout and the sibling pointer last. No filler, front-loaded with the core capability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, yet the description explains what is returned and what a timeout error reveals. Combined with 100% schema coverage and no annotations needed for a read-only wait, an agent has everything required to invoke it correctly.

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 100% and each parameter documents its own semantics including examples and defaults, so the schema does the heavy lifting. The description adds the AND-combination rule across conditions, which is genuine value, but per-parameter meaning is otherwise redundant.

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?

States a specific verb (wait) and resource (current page URL/title), enumerates the exact conditions (urlContains, urlMatches, titleContains) and their AND semantics. Clearly distinguished from sibling wait_for_element, which it explicitly names.

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

Usage Guidelines5/5

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

Explicitly says when to use it: after a navigating/redirecting action (login submit, link click, SPA route change) and before checking the new page. Also routes the agent to wait_for_element for element waits, so both when-to-use and alternative are covered.

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