Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

wait_for

Read-only

Pauses automation until a CSS selector appears, hides, or enables, text, URL, or console matches, or a node count is reached.

Instructions

Wait until a selector exists/hides/enables, text/URL/console matches, or node count is met

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoText that must appear in document.body
hiddenNoCSS selector that must be absent or not visible
enabledNoCSS selector that must exist and not be disabled
minCountNoMinimum matches required for countSelector
selectorNoCSS selector that must exist
targetIdNo
processIdNoTarget process ID. Omit if only one app is running.
timeoutMsNo
urlIncludesNoSubstring that location.href must include
countSelectorNoCSS selector to count (use with minCount)
consoleIncludesNoSubstring that a buffered console message must include
screenshotOnTimeoutNoIf true, save a PNG to the OS temp dir when wait times out

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.1

TDQS

C2.9/5.0
Behavior2/5

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

readOnlyHint=true already tells the agent this is a safe read, so the description needed to add what the annotations cannot: what happens on timeout (throws vs. returns), whether the result is a boolean or the matched element, and whether conditions combine. None of that is stated; screenshotOnTimeout hints at timeout behavior but the outcome is undisclosed.

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 compact clause with zero filler, and the verb and conditions are front-loaded. It is arguably too terse for a 12-parameter tool, but nothing in it is wasted.

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 flexible multi-condition wait with 12 optional parameters and no output schema, the agent needs combination semantics, default timeout behavior, and return value shape. The one-line description supplies none of these, leaving the schema to imply behavior it does not actually specify.

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 83%, so the schema itself documents most parameters well. The description adds no semantics beyond that — critically, it never says whether multiple supplied conditions are ANDed, NORed, or first-match-wins, which is the single most important thing to know for a 12-parameter, zero-required tool.

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 ("Wait until") and enumerates the concrete conditions (selector exists/hides/enables, text/URL/console match, node count met), which separates it from a generic wait. It does not, however, distinguish it from siblings like wait_network_idle or assert_ui, leaving the agent to infer the difference from names alone.

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 versus wait_network_idle, assert_ui, or act_and_verify, nor any note on prerequisites such as needing an attached process. Usage is only implied by the name and the condition list.

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

Deploy Server

Other Tools