Skip to main content
Glama

wait_for_change

Read-onlyIdempotent

Wait for an element's text or attribute to change, enabling detection of SPA loading states and live DOM updates without page navigation.

Instructions

[Agent Browser] Wait for an element's content or attribute to change. Use for SPAs that update DOM without navigation (loading states, live data). If attribute is None, watches for text content changes.

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": {
      "selector": "<selector>"
    },
    "name": "wait_for_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorYes
attributeNo
timeout_msNo

Output Schema

NameRequiredDescriptionDefault
dataNo
hintsNo
messageNo
successNo
suggestionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior3/5

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

The annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds real value by stating that a null attribute means it watches text content, but it is silent on the most consequential behavior: what happens when the timeout elapses (error vs. return) and whether the call blocks. With an output schema present, return shape needn't be explained, so a 3 is fair.

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?

Three short sentences, front-loaded with the core action and followed by the usage scenario and the parameter caveat. Slight overlap between 'content or attribute' in sentence one and the text-content clause in sentence three, but no wasted prose.

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?

With only three parameters, annotations covering safety, and an output schema covering returns, the definition covers most of what is needed. The remaining gap is timeout/failure semantics, which matters for a blocking wait tool that an agent may call in a retry loop.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 carry parameter meaning, and it does explain the one non-obvious parameter's null semantics ('If attribute is None, watches for text content changes'). Selector and timeout_ms remain undefined beyond their schema types and default, but the highest-risk ambiguity is resolved.

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 and resource ('Wait for an element's content or attribute to change') and scopes it to attribute-or-text watching, which separates it from pure-text siblings such as wait_for_text. It stops short of explicitly naming which sibling to reach for, so an agent choosing among wait, wait_for, wait_for_text and wait_for_url still has to infer the boundary from the 'attribute' clause.

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?

'Use for SPAs that update DOM without navigation (loading states, live data)' gives a concrete usage context that tells the agent which scenario this tool is built for. There is no explicit when-not guidance or named alternative, but the second sentence's default-behavior note implicitly routes text-only waits to a different pattern.

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