Skip to main content
Glama
Edge DevTools MCP

Edge DevTools MCP

by syunnrai123

edge_wait_for_selector

Waits for a page element matching a CSS selector to appear before continuing, with an optional timeout. Use it to synchronize browser automation with dynamically loaded content.

Instructions

等待元素出现

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

Input Schema

NameRequiredDescriptionDefault
timeoutNo超时时间(毫秒)
selectorYesCSS选择器

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.5/5.0
Behavior2/5

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

Because no annotations are provided, the description must carry the full behavioral burden, and it does not. It does not say whether the call blocks until the condition is met, what happens when the timeout expires (throw, return null, or return false), or whether it waits for DOM attachment or for visibility. The only timing hint, the 30000 ms default, lives in the schema, not in the description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short phrase with no filler, so it is concise. However, this brevity leaves the definition under-specified rather than efficient, and there is no structure to front-load because there is no content beyond four characters.

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 blocking wait primitive with no annotations and no output schema, an agent needs documentation of the failure mode, the return value, and the definition of 'appear'; the description supplies none of this. The omission is significant because the caller must decide how to handle a timeout in automation scripts.

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 description coverage is 100%: selector ('CSS选择器') and timeout ('超时时间(毫秒)', default 30000) are both documented in the schema. The description adds no meaning beyond that, so the baseline of 3 applies. It could have clarified that the timeout format is in milliseconds and is measured from the call time.

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

Purpose3/5

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

The phrase '等待元素出现' (wait for an element to appear) does name an action and an object, but it largely restates the tool name edge_wait_for_selector rather than explaining the semantics. It never defines what 'appear' means: attached to the DOM, visible on screen, or displayable. Nothing in the description distinguishes this tool's contract from the sibling tools edge_get_element or edge_dom_query.

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?

No guidance is given about when to call this tool instead of polling with edge_dom_query or edge_get_element. The description is completely silent about prerequisites, such as requiring an active connection via edge_connect, and about what to do after a wait succeeds or fails.

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