Skip to main content
Glama

wait_for

Waits until specified text or a CSS selector appears on a page, or delays for a set number of seconds.

Instructions

Wait until text or a CSS selector appears on the page, or just for a number of seconds.

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": {
      "tabId": "<tabId>"
    },
    "name": "wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNo
tabIdYesTab ID, from tabs_list or tab_create
secondsNoTimeout (or plain wait if no text/selector), default 10, max 30
selectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it says nothing about what happens on timeout (error, exception, or silent return), what the call returns, or whether text matching is case-sensitive or substring-based. The only concrete constraints (default 10s, max 30s) are already in the schema for seconds, so the description adds little beyond that.

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?

A single front-loaded sentence that enumerates the three wait modes in a readable order, with no filler. Slightly terse given the behavior it leaves unexplained, but the deliverable itself is tight.

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

Completeness2/5

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

For a browser automation wait tool with no annotations and no output schema, the agent still needs to know failure behavior, return shape, and whether both text and selector can be combined. None of that is present, leaving meaningful gaps for a tool that agents will typically use as a synchronization primitive.

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%: tabId and seconds are documented, while text and selector are not. The description partially compensates by implying text is matched against page content and selector must be CSS, but it does not specify precedence when both text and selector are supplied, nor matching semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb plus the exact wait conditions: text appearance, CSS selector appearance, or a plain time delay. That is enough to distinguish it from siblings like find, get_page_text, or click, though it never names any of them.

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

Usage Guidelines3/5

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

The three modes of use (wait for text, wait for selector, wait N seconds) are laid out, which implies when to reach for the tool. However, there is no guidance on when not to use it, no mention of prerequisites such as then tab already existing, and no pointer to an alternative if the element is already present.

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