Skip to main content
Glama
puppeteer-mcp-claude

puppeteer-mcp-claude

by jaenster

puppeteer_wait_for_selector

Waits until a specified element appears in the DOM, so you can pause automation until dynamic content is ready to interact with.

Instructions

Wait until an element matching the selector appears in the DOM.

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": "puppeteer_wait_for_selector"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdNo
timeoutNo
selectorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It usefully clarifies that the wait is for DOM appearance rather than visibility, but omits default timeout behavior, what happens on timeout, selector syntax expectations, and how pageId defaults or selects a page.

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?

A single front-loaded sentence with no filler or redundancy. Its brevity is appropriate for the core statement, though the missing details are penalized under other dimensions.

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 three-parameter wait tool with no annotations and no output schema, the description is too thin. It does not explain timeout behavior or page targeting, so an agent cannot confidently call it with non-default values.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description only indirectly explains the selector parameter. It says nothing about timeout units/defaults or what pageId controls, so two of the three parameters remain undocumented.

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?

States a specific verb, 'wait', and a specific condition, 'until an element matching the selector appears in the DOM'. It is clearly distinguishable from sibling actions like click, type, or get_text, though it does not explicitly name alternatives.

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

Usage Guidelines2/5

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

Gives no guidance on when to use this tool versus relying on actions such as puppeteer_click or puppeteer_type to handle waiting implicitly. There are no prerequisites, exclusions, or mentions of alternatives, leaving usage only implied.

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