Skip to main content
Glama
kanishka-namdeo

electron-mcp-server

wait_for_selector

Pauses automation until a specified element appears, attaches, or changes visibility state on an Electron page, then continues once the selector condition is met.

Instructions

Wait for an element to appear on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNo
timeoutNo
selectorYes
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

C2.4/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 behavioral burden. It states the intent but omits critical traits: whether the call blocks, what the default state is, what happens on timeout (error vs. silent return), and whether it fails when the element is already present or absent forever.

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?

It is a single front-loaded sentence with zero waste, which is structurally clean. However, brevity here comes at the cost of under-specification rather than being earned conciseness.

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 4-parameter tool with no annotations, no output schema, and 0% schema description coverage, the description is far too thin. An agent cannot determine timeout behavior, state semantics, or failure modes from this definition alone.

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

Parameters1/5

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

Schema description coverage is 0% across 4 parameters, so the description must compensate and does not mention any parameter. The 'state' enum is especially ambiguous: values 'detached' and 'hidden' contradict the plain reading of 'appear on the page', and no explanation is offered for 'timeout' 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 states a specific verb and resource ('Wait for an element to appear on the page'), which is unambiguous about the operation. It does not differentiate from siblings or clarify scope (e.g., within which session/page), but no other sibling performs a wait, so the risk of misselection is low.

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?

There is no guidance on when to use this tool versus alternatives such as polling get_text or simply clicking. Nor does it mention typical contexts (after navigation, after a click that triggers rendering) or what to do when the wait is unnecessary because the element already exists.

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