Electron Stagewright
Electron Stagewright is an agent-native MCP server for driving real Electron desktop applications, with built-in error recovery hints, token cost reporting, and atomic state operations.
Session Management
Launch an Electron app by providing a main-process JS entry or executable path (
electron_launch)Attach to an already-running Electron app via a CDP debug endpoint (
electron_attach)Inject into a running process not started with debug flags (
electron_inject)Discover running debuggable Electron apps on loopback ports (
electron_discover_running)List and switch between app windows (
electron_windows_list,electron_switch_window)Get app info including runtime versions, code-signature status, and transport capabilities (
electron_info)Stop (graceful with auto-escalation to SIGKILL), force-kill, or detach from a session
Inspection & Snapshots
Snapshot the renderer accessibility tree with roles, names, states, bounding boxes, and stable refs (
electron_snapshot)Get diff snapshots (
since: 'last') and compact text format for token-efficient outputFind elements by accessibility role, name, visibility, and enabled state — no CSS selectors needed (
electron_find)List elements matching a CSS selector (
electron_elements_list)
Reading Element State & Properties
Get full state (visible, enabled, checked, focused, expanded, etc.) in one call (
electron_get_state)Get text, form control value, attributes, bounding box, and computed CSS styles
Check element existence and get the currently focused element
Interaction
Click (left/right/middle, double-click), hover, and drag elements
Type text directly, as real keystrokes, or into code editors (Monaco, CodeMirror)
Press keys or chords (e.g.,
Control+A,ArrowDown) and key sequencesClear inputs, select dropdown options, check/uncheck checkboxes and radios
Drop files onto elements or set files on file inputs
Scroll elements into view or dispatch wheel events
Waiting & Polling
Wait for fixed durations, selector states (attached/visible/hidden/detached), composite state flags, or DOM events
Assertions (Retrying expect_* Tools)
Assert element text, form value, visibility, state flags, element count, and window URL with predicates (equals, contains, regex, not_equals, etc.)
One-shot pattern assertions on text or attributes
Diagnostics
Capture screenshots of windows or elements (PNG/JPEG)
Read renderer console logs with filters for level, regex, and time range
Handle native dialogs (alert/confirm/prompt/beforeunload) with auto-responders and event inspection
Plugins & Security
Extensible via plugins: session traces/replay, IPC capture/stub, production validation (codesign, notarization), network capture/stub, virtual time, storage (cookies, localStorage, IndexedDB), and native UI (menus, notifications, tray)
Arbitrary JS execution is opt-in (
--allow-eval), host paths are confined (--app-root), and env/argument sanitization prevents injection
Allows AI agents to control real Electron desktop applications: launch apps, inspect the accessibility tree, click, type, select elements, read state, take screenshots, handle dialogs, and assert UI state using stable refs or selectors.
Electron Stagewright
Agentic UX testing for real Electron apps. Cue the app, prove the experience, and return bounded evidence through MCP.
Electron Stagewright is a Model Context Protocol (MCP) server that lets Claude Code, Codex, Cursor, Cline, Aider, and any MCP-compatible agent operate real Electron applications. Launch or attach, inspect the accessibility tree, interact through stable refs, assert behavior with retrying expectations, and capture diagnostics without turning every check into another agent round-trip.
Why this exists
Browser automation already has mature agent tooling. Electron adds a different boundary: the main process, renderer surfaces, native menus and dialogs, multiple windows, packaged runtimes, and signed release artifacts. A browser API exposed through MCP does not cover that whole product.
Electron Stagewright is designed agent-first from the primitive level up:
Errors carry hints, suggested next actions, and similar-ref alternatives — agents recover without an extra round-trip asking for context.
Every response reports its own token cost — agents budget in real time, not after the fact.
get_statereturns the full state envelope in one call — visible, enabled, checked, focused, disabled, aria-expanded, aria-busy, aria-invalid. No 4-call chain to decide if a button is clickable.wait_for_stateaccepts composite predicates —{ visible: true, enabled: true, focused: false }evaluated atomically by the server. One call replaces three.Snapshots flag
recently_changedelements — agents focus reasoning on what differs from the last view instead of reprocessing the whole tree.Snapshot diffs are a parameter, not a separate tool —
electron_snapshot({ since: 'last' })returns only deltas. Fewer APIs to remember.Compact text encoding on demand —
electron_snapshot({ format: 'text' })renders one line per element ([3] textbox "Email" value="" focused) with only non-default state, cutting snapshot tokens 5-10x versus the JSON shape when the agent just needs to look.expect_*primitives replace read-compare-retry chains —electron_expect_text({ ref, equals: 'Welcome', timeoutMs: 5000 })is one call, not five.electron_findqueries the accessibility tree semantically —{ role: 'button', name_contains: 'Submit', visible: true }— no CSS selectors, no XPath, no guessing.Hot-reload-aware — snapshot and find responses report when the renderer reloaded since the previous baseline, so agents know refs may need refreshing.
Framework-agnostic snapshot — built on accessibility roles and ARIA instead of framework-internal properties. Current fixtures cover vanilla, React, Vue, and Angular; the broader renderer matrix is still expanding.
Related MCP server: mcp-electron-driver
Electron-deep workflows
The server treats three Electron-specific workflows as first-class:
Attach to a running dev server without restarting it.
electron_attachconnects to apps exposing a loopback CDP endpoint, andelectron_injectcan attach to a running main process via the Node Inspector handshake when no debug flag was arranged up front.Session traces with deterministic replay and per-tool token budgets. Inspired by Playwright's
trace.zipbut designed for LLM agent sessions: a timeline of tool calls, arguments, results, timings, and token estimates — replayable against a fresh app instance, with budgets so agents can cap runaway loops.End-to-end validation of signed, notarized, packaged
.appbundles —codesign, Gatekeeper assessment, autoUpdater feed inspection, URL-scheme declaration checks, and crash reporter machinery. The full production surface, not just dev.
Microsoft's official Playwright MCP team explicitly declined to support Electron ("you can release your own server for Electron" — Pavel Feldman, lead). This project takes the invitation seriously.
Quick start
The default launch transport uses Playwright and an Electron runtime. For a private setup in the current project, keep the server local to that project and pin the release-tested package set:
Before configuring an MCP host, run the same package set once in a terminal to prime a fresh npx
cache. Electron may print binary-download progress to stdout during this first install, which would
corrupt an MCP stdio session; the terminal bootstrap completes the install before the host starts it.
npx -y --package @electron-stagewright/core@0.5.0 --package playwright@1.61.1 \
--package electron@42.3.0 electron-stagewright doctor --jsonclaude mcp add electron-stagewright -- \
npx -y --package @electron-stagewright/core@0.5.0 --package playwright@1.61.1 \
--package electron@42.3.0 electron-stagewrightThe default Claude Code scope is local: it is available only in the current project and stays out
of unrelated workspaces. To share a reviewed configuration with a team, use --scope project,
which writes the same mcpServers shape to .mcp.json. See the
Claude Code MCP scopes for the host-specific behavior.
To verify a host before pointing it at your app, add the pinned
@electron-stagewright/demo@0.1.0 package and use the demo guide. The demo
is opt-in, so a normal core installation neither loads nor depends on it.
For local development, build the checkout and point your MCP host at the built CLI:
pnpm install
pnpm build
claude mcp add electron-stagewright -- \
node /abs/path/to/electron-stagewright/packages/core/dist/cli.jsShared project .mcp.json shape:
{
"mcpServers": {
"electron-stagewright": {
"command": "npx",
"args": [
"-y",
"--package",
"@electron-stagewright/core@0.5.0",
"--package",
"playwright@1.61.1",
"--package",
"electron@42.3.0",
"electron-stagewright"
]
}
}
}Then from any MCP-compatible agent:
// Launch
mcp__electron-stagewright__electron_launch({
main: "/abs/path/to/.vite/build/main.js",
env: { MY_ENV_VAR: "value" }
})
// Inspect with full state per ref
mcp__electron-stagewright__electron_snapshot()
// → [1] button "Open File" enabled=true visible=true
// [2] button "Settings" enabled=true visible=true
// [3] textbox "Email" value="" focused=false
// [4] heading "Welcome"
// Interact by ref
mcp__electron-stagewright__electron_click({ ref: 2 })
// Wait for a composite state in one call
mcp__electron-stagewright__electron_wait_for_state({
ref: 3, state: { focused: true, enabled: true }, timeoutMs: 2000
})
// Assert + retry in one call instead of read-compare-retry chain
mcp__electron-stagewright__electron_expect_text({ ref: 4, equals: "Welcome back" })
// Stop
mcp__electron-stagewright__electron_stop()The full tool list — every tool, its parameters, and operation type — is in
TOOL-REFERENCE.md, generated from the live dispatcher manifest
(pnpm docs:tools).
Documentation
Getting started — from a clean checkout to a complete driven session against the bundled example app.
Try the packaged demo — verify a published MCP host setup against a local, multi-window Electron task board without supplying your own app path.
Connect your MCP client — wire the published package into Claude Desktop, Cursor, or any MCP host, and confirm it connected.
Launch, attach, or inject — getting a session against YOUR app, including apps that are already running.
Assert UI state — refs vs selectors, the
expect_*family, waits, and snapshot diffs.Type into code editors — the reliable Monaco / EditContext typing path,
replace, the auto-pairing caveat, and how to verify the text landed.Capture diagnostics — screenshots, console, dialogs, and session traces.
Load, configure, and diagnose plugins — explicitly load plugins, grant their narrowest gates, and inspect enabled tools and safe config with
electron_plugins.Migrate from electron-driver — tool-by-tool mapping and the conceptual shifts.
Choose an Electron MCP server — compare Electron automation workflows by capability, trust boundary, recovery evidence, and your own app.
Compatibility — see which Node, Electron, operating-system, and transport combinations are verified by unit tests or real-runtime CI.
Concepts — the agent-native model and why the server is shaped the way it is: the response envelope, refs, snapshots, retrying assertions, sessions, and the eval/plugin trust model, each linked to the decision that set it.
Security model — the trust model, the controls behind
--allow-eval, and a deployment checklist.Guides index · TOOL-REFERENCE.md · Architecture Decision Records.
Server flags
Pass these after the CLI path in your MCP host config (the args array). All default to the safe
option; diagnostics go to stderr (stdout is reserved for the JSON-RPC protocol channel).
Flag | Effect |
| Register the |
| Confine host paths to within |
| Default directory |
| Per-dispatch backstop timeout (ms); a handler that never settles resolves as a retryable |
| Select the core tool surface: |
| Resolve an installed |
| Run preflight checks without starting MCP stdio: Node, Playwright, Electron, Linux display, configured paths, eval policy, project runtime alignment, and the exact serve configuration. Pass the same plugin/config/profile/timeout/demo flags you plan to serve with; doctor imports and briefly sets up only those explicitly trusted plugins, validates the complete server object graph, then tears it down. JSON mode includes bounded runtime/configuration facts and exits non-zero when a required check fails. Run it as |
| Validate a packaged macOS |
| Load a plugin by package name, first-party short name, or file path. Repeatable; a single value may be comma-separated. e.g. |
| Supply a plugin's config as inline JSON, validated against its schema. Keyed by plugin name; invalid input reports its Zod field path and correction input. |
Security defaults worth knowing when wiring this into another project: arbitrary JS (the
--allow-eval policy) and host-path launches (--app-root) are opt-in; electron_launch refuses
runtime-altering env vars (ELECTRON_RUN_AS_NODE, NODE_OPTIONS, LD_*, DYLD_*); and
user-supplied regex / text / key arguments are length- and complexity-bounded so a hostile tool call
cannot wedge the server.
Use --tool-profile essential when an agent needs the common launch, snapshot, interaction, wait,
and assertion workflow with a smaller initial manifest. Choose testing for the broader interaction,
read, and screenshot-evidence surface, or debug for attach, discovery, window, console, screenshot,
and dialog work.
full stays the default until the profile benchmark demonstrates equivalent task success with a
material context saving. See ADR-021 for the
measured budget policy.
What each response looks like (the agent-UX detail)
Success, for example from electron_expect_text:
{
"ok": true,
"session_id": "pw-...",
"matched": true,
"actual": "Welcome back",
"_meta": {
"estimated_tokens": 24,
"elapsed_ms": 142,
"session_id": "pw-...",
},
}Error:
{
"ok": false,
"error": "ref 7 not found in current snapshot",
"code": "REF_NOT_FOUND",
"hint": "The DOM may have rerendered since the last snapshot.",
"next_actions": ["electron_snapshot()", "electron_find({ role: \"button\" })"],
"similar_refs": [
{ "ref": 9, "role": "button", "name": "Submit" },
{ "ref": 12, "role": "button", "name": "Cancel" },
],
"retryable": false,
"http": 404,
"_meta": { "estimated_tokens": 89, "elapsed_ms": 23 },
}The agent has everything to decide its next move without asking for context.
Architecture
Three transport implementations behind a single ITransport interface, so the project survives if Playwright's experimental _electron API changes or gets deprecated:
PlaywrightElectronTransport—_electron.launch(), fast path (default).CDPTransport— Chrome DevTools Protocol direct, no Playwright dependency; launches packaged executables through a managed loopback endpoint or attaches to an existing one, with snapshot/find on the selected root page plus eval, observe, and interaction surfaces.InjectorTransport— Node Inspector handshake into a running process; supports main-process eval, window discovery, and console capture when an app was not started with a CDP endpoint.
Plugin model: a small core, with domain capabilities shipped as separate @electron-stagewright/plugin-* packages loaded explicitly via --plugin (the core never auto-scans). Shipped today: plugin-a11y (surface-scoped axe-core audits with bounded violations and incomplete checks; a fixed engine, not agent JavaScript, so no --allow-eval grant), plugin-visual (BrowserWindow visual baselines with explicit update confirmation, environment metadata, confined artifact roots, and actual/diff evidence), plugin-trace (session trace + deterministic replay + per-tool token budget), plugin-ipc (capture / invoke / stub Electron IPC, gated behind main eval: --allow-eval=main, or bare --allow-eval), plugin-production (validate packaged macOS, Windows, and Linux artifacts through MCP, a public library API, or a CI JSON CLI: bundle integrity, update/crash machinery, macOS signing/notarization/Gatekeeper, Windows Authenticode, and AppImage embedded signatures), plugin-network (renderer request/response capture, bodies, and stubbing via the transport seam), plugin-clock (deterministic renderer virtual time via the Playwright clock seam), plugin-storage (read, seed, and assert cookies plus storage snapshots through the no-eval transport seam, and per-key localStorage / sessionStorage plus IndexedDB records through a renderer-eval gate; cookie values are redacted by default, IndexedDB values can be redacted with config), and plugin-native-ui (read, assert, and invoke the application menu — the macOS menu bar — capture the notifications the app shows including startup ones, and read system-tray state plus fire tray events via launch-time instrumentation, all via the transport native-UI seam, no eval).
Dogfooding targets
The MCP is built against two real Electron applications maintained by the author, covering distinct verticals so the design doesn't accidentally bias to one shape:
Code-editor shape — a code editor with runtime sandboxes, licensing, and IPC-heavy state. Stresses keyboard-driven flows, editor state, and license verification.
POS shape — a multi-tenant Point of Sale desktop app with embedded Fastify server and SQLite. Stresses forms, large tables, embedded backend, auto-updater feeds.
If your Electron app has a shape these don't cover, open an issue — we'd love to add it as an example fixture.
Security
The server is a privileged local tool, not a sandbox: it drives a real app and, under an eval opt-in (--allow-eval or a target-specific variant), runs arbitrary JavaScript inside it, so only a trusted agent host should invoke it. The security model covers the trust boundaries, the controls (eval opt-in + blocklist, channel allowlists, launch confinement, structured redaction), and a deployment checklist; the posture is recorded in ADR-014. To report a vulnerability, see SECURITY.md.
Contributing
This project is in its earliest days. Issues and discussions welcome. See CONTRIBUTING.md for the workflow, and GOVERNANCE.md for how the project is run and the path to becoming a co-maintainer.
License
MIT — see LICENSE.
Available Tools
30 toolselectron_assert_patternAssert a text or attribute patternARead-only
Validate, in a single check (no polling), that an element's text or a named attribute matches a pattern. Target by ref or selector. With attribute set, reads that attribute; otherwise reads the element's trimmed text. Provide exactly one of: equals, contains, matches_regex. Optional flags (any of i, m, s, u) apply to matches_regex; g and y are rejected as stateful. Returns: { ok, session_id, matched, actual }. Errors: EXPECTATION_FAILED (element found but its value did not match the pattern — details carry expected + actual; a missing attribute reads as actual: null), SELECTOR_NO_MATCH (no element matched — this is one-shot, so a missing element is a precondition failure, not a retry; carries similar_refs), REF_NOT_FOUND (stale ref), TRANSPORT_UNSUPPORTED, NOT_RUNNING, BAD_ARGUMENT (no/multiple predicates, invalid regex or flags, or ref+selector both/neither).
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| flags | No | Optional regex flags (any of i, m, s, u) applied to the regex predicate; g and y are rejected as stateful. Only valid alongside a regex predicate. | |
| equals | No | The value must equal this exactly. | |
| contains | No | The value must contain this substring. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| attribute | No | Attribute name to read (e.g. "value", "aria-label"). Omit to read text. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| matches_regex | No | The value must match this JavaScript regular expression. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds significant behavioral context beyond the readOnlyHint=true annotation, including that it is a single check without polling, details about missing attributes returning null, and that a missing element is a precondition failure (not a retry). It also specifies all error types and constraints on regex flags. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and information-dense, starting with the core purpose, then detailing targeting, matching, return value, and errors. Every sentence adds value, though it could be slightly trimmed without losing clarity. It is appropriately front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 8 parameters, no output schema, and no nested objects, the description compensates thoroughly: it explains targeting, matching options, flags, return fields, and all error types. It is complete enough for an agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the schema already provides descriptions for all 8 parameters (100% coverage), the tool description adds meaningful semantics: explaining that exactly one predicate must be provided, the effect of the attribute parameter on the value read, and the constraints on regex flags (g and y rejected as stateful). This goes beyond the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Validate, in a single check (no polling), that an element's text or a named attribute matches a pattern.' It specifies the verb (validate) and resource (element text/attribute) and distinguishes it from sibling tools like electron_expect_text or electron_get_text by emphasizing the single-shot nature and pattern matching.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear instructions on how to target elements (by ref or selector), how to choose between text and attribute validation, and the requirement to provide exactly one of equals/contains/matches_regex. However, it does not explicitly mention when this tool should be used over alternatives or when not to use it, such as when polling is needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_attachAttach to running Electron appA
Attach to an already-running Electron app exposing a CDP debug endpoint (use electron_discover_running to find one, or start the app with --remote-debugging-port). Provide port (+ optional loopback host) or a loopback cdpUrl; pid alone is not attachable over CDP but, when supplied alongside, lets stop escalate to SIGKILL. The CDP transport supports eval/read/observe and core interaction surfaces against the attached app. Returns: { ok, session_id, transport, windows }. Errors: TRANSPORT_UNSUPPORTED (no attach-capable transport), CDP_DISCONNECTED (endpoint unreachable or dropped; retryable), CDP_TIMEOUT (handshake/method timeout; retryable), BAD_ARGUMENT (missing target selector or non-loopback endpoint).
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | Process id of the running app. | |
| host | No | Loopback host for port-based attach. Defaults to localhost. | |
| port | No | CDP port; the endpoint is resolved from /json/version. | |
| cdpUrl | No | Full CDP WebSocket URL on a loopback host. | |
| timeoutMs | No | Max wait for the attach handshake. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations (readOnlyHint=false, openWorldHint=false) are complemented by detailed behavioral disclosure: the transport supports 'eval/read/observe and core interaction surfaces', errors are listed (TRANSPORT_UNSUPPORTED, CDP_DISCONNECTED, etc.), and the side effect of pid enabling SIGKILL is noted. This adds value beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single paragraph but densely packs essential information with clear sections for returns and errors. It is front-loaded with the purpose. Minor improvement could be gained from more structural formatting (e.g., bullet points), but it remains efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 5 parameters, no required, and no output schema, the description covers all needs: purpose, parameter guidance, behavior, error conditions, and return structure. It is completely adequate for an agent to use this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
While schema coverage is 100% (baseline 3), the description adds meaningful context: explains how port and host resolve the endpoint from /json/version, that cdpUrl must be loopback, that pid alone is insufficient but aids stop, and timeoutMs for handshake. This extra guidance merits a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Attach to an already-running Electron app exposing a CDP debug endpoint'. It uses specific verb ('attach') and resource ('running Electron app'), and distinguishes from siblings like electron_launch and electron_discover_running by requiring an existing debug endpoint.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit guidance is provided: use when you have a running app with a CDP endpoint, mention alternative electron_discover_running to find one, and specify that 'pid alone is not attachable over CDP'. It also clarifies which parameters to use (port+host or cdpUrl) and that pid is optional for stop escalation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_checkCheck a checkbox or radioA
Check the checkbox/radio identified by ref or selector (no-op if already checked). Options: force, timeoutMs. Returns: { ok, session_id, target, checked: true }. Errors: REF_NOT_FOUND / SELECTOR_NO_MATCH (carries similar_refs), ELEMENT_NOT_VISIBLE (retryable), ELEMENT_DISABLED, NOT_RUNNING, BAD_ARGUMENT.
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| force | No | Bypass actionability checks (visibility/enabled/stable). Default false. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses behavioral traits: no-op if already checked, and lists error types including retryable ones. Annotations confirm mutation, no contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences plus a concise list of options and errors, front-loaded with the main action. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, no output schema, the description covers the main action, return format, and errors. Could explain the 'target' field in return, but adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by specifying return format, error types, and the no-op condition, going beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The title and description clearly state the tool checks a checkbox/radio, with explicit mention of no-op if already checked. It distinguishes from sibling tools like electron_uncheck.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for checkbox/radio elements and mentions no-op behavior, but does not explicitly state when to use this over alternatives like electron_click or electron_uncheck.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_clear_inputClear an inputA
Clear the value of the input/textarea identified by ref or selector (sets it to empty). Options: force, timeoutMs. Returns: { ok, session_id, target, cleared }. Errors: REF_NOT_FOUND / SELECTOR_NO_MATCH (carries similar_refs), ELEMENT_NOT_VISIBLE (retryable), ELEMENT_DISABLED, NOT_RUNNING, BAD_ARGUMENT.
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| force | No | Bypass actionability checks (visibility/enabled/stable). Default false. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate readOnlyHint=false, aligning with the mutation behavior. The description adds details about options (force bypasses actionability checks), return structure, and specific error types with retryability hints, going beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences plus compact lists of options, returns, and errors. Every element is essential and informative with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers core action, identification options, options, return shape, and errors. Does not mention event firing or mutual exclusivity of ref/selector explicitly, but the schema covers the latter. Sufficient for a clear-input tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description summarizes parameters (ref/selector, force, timeoutMs) and lists errors, but adds little new meaning beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb-resource pair: 'Clear the value of the input/textarea' and distinguishes it from sibling tools like electron_type or electron_get_value.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context that the tool clears an input to empty, but does not explicitly contrast with alternatives like electron_type ' ' or electron_press_sequence. The context is sufficient for an agent to infer usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_clickClick an elementA
Click the element identified by ref (from a snapshot) or selector. Options: button (left|right|middle, default left), clickCount (2 = double-click), force (bypass actionability), timeoutMs. Returns: { ok, session_id, target }. Errors: REF_NOT_FOUND / SELECTOR_NO_MATCH (no such element — re-snapshot; not retryable, carries similar_refs), ELEMENT_NOT_VISIBLE (retryable), ELEMENT_DISABLED (not retryable), NOT_RUNNING, BAD_ARGUMENT (ref+selector both/neither).
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| force | No | Bypass actionability checks (visibility/enabled/stable). Default false. | |
| button | No | Mouse button. Default left. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). | |
| clickCount | No | Number of clicks (2 for a double-click). Default 1. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only indicate the tool is not read-only and not open-world. The description adds extensive behavioral context: mouse button options, double-click via clickCount, force bypassing actionability, timeoutMs, and detailed error conditions with retryability semantics. This far exceeds annotation disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single well-structured paragraph that front-loads the core action, then lists options, return value, and errors. Every sentence contributes necessary information without redundancy. Highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (7 params, no output schema, rich error handling), the description covers the main action, options, return shape, and error semantics comprehensively. Minor gap: the 'target' field in the return is not explained, and the description does not mention that omitting both ref and selector triggers BAD_ARGUMENT, but this is inferable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for all 7 parameters. The description summarizes options but does not add new parameter-level meaning beyond the schema. The baseline of 3 is appropriate as the description adds organizational value but no new semantic detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Click the element identified by ref (from a snapshot) or selector', combining a specific verb (click) with a specific resource (element). It distinguishes this from sibling tools by specifying input methods (ref or selector) and options like button and clickCount.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides usage guidance for parameters (e.g., ref vs selector, double-click via clickCount) and error handling (e.g., re-snapshot on REF_NOT_FOUND), but does not explicitly compare to alternatives or state when to use this tool over sibling actions like hover or drag. Implied use case for clicking is clear, but lacking explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_console_logsRead console logsARead-only
Read the captured renderer console output for the session, newest-relevant entries last. Filters (all optional, ANDed): type (one or more of log/info/warning/error/debug/...), match (a regular expression the text must match), since (epoch ms — only entries at/after it), limit (max entries, default 200, max 1000 — the most recent are kept). Returns: { ok, session_id, entries: [{ type, text, timestamp, windowId?, location? }], count, overflowed }. overflowed is the number of older entries the buffer dropped. Errors: NOT_RUNNING, BAD_ARGUMENT (invalid regex, or multiple sessions).
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Console level(s) to include, e.g. "error" or ["warning", "error"]. | |
| limit | No | Max entries to return (default 200, max 1000); keeps the most recent. | |
| match | No | Regular expression the entry text must match. | |
| since | No | Only entries with timestamp >= this (epoch ms). | |
| sessionId | No | Target session id. Omit when a single session is running. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true. Description adds value by detailing ordering, overflow behavior, error conditions (NOT_RUNNING, BAD_ARGUMENT). This goes beyond what annotations provide, making behavior fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is concise yet comprehensive, using parentheses and bullet-like structure. It front-loads the purpose, then lists filters and returns. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, description fully details return structure (entries with fields, count, overflowed) and lists errors. For a tool with 5 optional parameters and filtering logic, this is complete and covers all relevant context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description adds extra context: 'ANDed' for filters, 'epoch ms' for since, 'most recent are kept' for limit. This enhances understanding beyond raw schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states 'Read the captured renderer console output for the session' with a specific verb and resource. It also clarifies ordering ('newest-relevant entries last'), distinguishing it from sibling tools that perform different actions like clicking or waiting.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description explains all optional filters and their effects (ANDed, regex, epoch ms, limit). It implies usage for reading logs, but doesn't explicitly state when not to use or compare with alternatives. However, the context is clear enough for most use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_dialog_handlerHandle native dialogsA
Arm the auto-responder for native JS dialogs (alert/confirm/prompt/beforeunload) and read which dialogs fired. Dialogs block the renderer, so the policy is applied automatically the instant one appears. Arming args (all optional): action (accept|dismiss — the default for every dialog), perType (per-kind overrides, e.g. {"confirm":"accept","beforeunload":"dismiss"}, falls back to action), promptText (text submitted to prompt() when it is accepted), oneShot (apply to exactly the next dialog, then revert to dismiss). With NO arming args the call is inspect-only and leaves the policy unchanged. Read args (all optional): type (one or more kinds to include), since (epoch ms), limit (max events, default 50, max 200 — most recent kept), clear (flush the whole buffer after reading). Until armed, the default policy is dismiss, so dialogs never hang the app. Returns: { ok, session_id, policy, entries: [{ type, message, action, defaultValue?, promptText?, timestamp, windowId? }], count, overflowed }. overflowed counts dropped events across the whole buffer, not just the returned (type/since/limit-filtered) subset. Errors: NOT_RUNNING, BAD_ARGUMENT (promptText without an accepting prompt policy, or oneShot without a policy to arm).
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Dialog kind(s) to include when reading, e.g. "confirm" or ["confirm","prompt"]. | |
| clear | No | Flush the entire dialog buffer after reading (not just the returned subset). | |
| limit | No | Max events to return (default 50, max 200); keeps the most recent. | |
| since | No | Only events with timestamp >= this (epoch ms). | |
| action | No | Default response for every dialog. Omit (with no perType) for an inspect-only call. | |
| oneShot | No | Apply the policy to exactly the next dialog, then revert to dismiss. | |
| perType | No | Per-kind response overrides; a kind not listed falls back to action. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| promptText | No | Text submitted to prompt() dialogs when they are accepted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description fully discloses behavior: dialogs block the renderer, policy is applied automatically, default is dismiss to prevent hangs, overflow behavior, and error conditions (NOT_RUNNING, BAD_ARGUMENT). It does not contradict annotations (readOnlyHint=false).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear separation of arming and reading arguments. It is fairly long but every sentence adds value, explaining modes, defaults, and edge cases. Slightly verbose but efficient for the complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description fully documents the return object (ok, session_id, policy, entries, count, overflowed). It covers all modes, parameter interactions, and errors. Given the tool's complexity (two modes, 9 params), the description is complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds essential context: action is the default, perType overrides, promptText requires accepting prompt, oneShot is for next dialog then revert, limit defaults/max, clear flushes whole buffer, overflowed counts across full buffer. This goes far beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's dual function: arming an auto-responder for native dialogs and reading fired dialogs. It distinguishes between the two modes and explains the default policy. No sibling tool handles dialogs, so it is distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use arming vs. reading (e.g., 'With NO arming args the call is inspect-only'). It mentions that dialogs block the renderer and why the default policy is dismiss. It does not explicitly exclude alternatives, but no siblings exist for this purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_discover_runningDiscover running Electron appsARead-only
Scan the conventional CDP debug ports (9222-9225 by default) for already-running, debuggable Electron apps on loopback only. No session required. Returns: { ok, targets, count, scanned } where each target is { targetId, port, appName, pid } and scanned reports { host, ports, elapsed_ms } so an empty result is unambiguous. Errors: BAD_ARGUMENT (non-loopback host, invalid port list, or timeout outside bounds). A failed probe is simply "no target on that port".
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Loopback host to scan. Defaults to 127.0.0.1. | |
| ports | No | Ports to scan. Defaults to 9222-9225. Max 64. | |
| timeoutMs | No | Per-port timeout in ms. Defaults to 300. Max 5000. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, indicating safe read. The description adds detailed behavior: scans specified ports, returns diagnostic structure, reports errors (BAD_ARGUMENT for invalid inputs), and clarifies that a failed probe is simply 'no target'. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact (3-4 sentences) and front-loaded: purpose first, then return format, error types, and failure behavior. Every sentence adds value, no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description fully specifies the return structure (ok, targets, count, scanned with subfields) and error cases. Given 0 required parameters and clear defaults, the agent can use this tool without ambiguity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, but the description adds extra constraints: default values (9222-9225, 127.0.0.1, 300ms), maximum port count (64), maximum timeout (5000ms), and host enum restriction to loopback. This adds meaningful context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Scan' and the resource 'already-running, debuggable Electron apps', specifying the scope 'on loopback only' and default port range. This distinguishes it from sibling tools like electron_launch or electron_attach.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description indicates this tool requires no session, implying it's a preliminary diagnostic step. It mentions error types and failure behavior, but does not explicitly compare to alternatives or state when not to use it. The context is clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_doctorDiagnose Electron Stagewright environmentARead-only
Run non-mutating preflight checks without starting an Electron session: Node version, Playwright, Electron, Linux display, configured app root and screenshot directory, eval policy, and project Electron runtime alignment. Returns: { ok, doctor_ok, checks, runtime }, where runtime includes server and, with --app-root, target Electron/Node/V8/ABI facts plus a bounded native-addon inventory. Inspect failed checks and warnings before electron_launch. Errors: none.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes tool as non-mutating, which aligns with readOnlyHint annotation. Additionally details what checks are performed and the return structure (including runtime facts and native-addon inventory), going well beyond the annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences with high information density: purpose, checks, return value, usage guidance, and error handling. No redundant words; every sentence serves a clear function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter diagnostic tool, the description fully explains the checks performed, the return structure, usage context, and error behavior. There is no missing information needed for correct invocation or interpretation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has zero parameters with 100% coverage. Description adds no parameter info but doesn't need to; baseline of 4 is appropriate as the description cannot add value over an empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it runs non-mutating preflight checks for the Electron Stagewright environment, listing specific resources checked (Node, Playwright, Electron, etc.). This distinctively separates it from siblings that perform actions like launching, clicking, or attaching.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises to inspect results before electron_launch, providing clear temporal guidance. While it doesn't name alternatives, the sibling list includes electron_launch and other tools, making the pre-launch use case unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_drop_fileDrop files onto an elementA
Simulate dropping OS files onto the element identified by ref or selector. Web DataTransfer mode: reads each path on the host running the server, rebuilds the files in the renderer, and dispatches dragenter/dragover/drop with a real DataTransfer — engaging standard web drop handlers. Paths must be ABSOLUTE (max 10 files, 5242880 bytes each). default_prevented reports whether a drop handler engaged (called preventDefault); false usually means the target has no web drop handler. Apps that resolve dropped files to native OS paths need an app-specific IPC convention this tool does not simulate. Options: mimeType, timeoutMs. Returns: { ok, session_id, target, files, default_prevented }. Errors: ABSOLUTE_PATH_REQUIRED, FILE_NOT_FOUND, BAD_ARGUMENT (too many/large files, or ref+selector both), SELECTOR_NO_MATCH / REF_NOT_FOUND (carries similar_refs), NOT_RUNNING.
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| paths | Yes | Absolute file paths to drop. | |
| mimeType | No | MIME type override applied to every file (defaults to extension-based). | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only indicate readOnlyHint=false, but the description extensively covers behavior: dispatches dragenter/dragover/drop events with a real DataTransfer, explains default_prevented meaning, details file size and path restrictions, and lists possible errors. This goes well beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with the core purpose first, followed by mechanism, constraints, and error enumeration. It is comprehensive but slightly lengthy; some redundancy exists (e.g., file counts repeated). Still, it earns its sentences.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no output schema, the description fully documents the return object fields (ok, session_id, target, files, default_prevented) and all error types. It also clarifies edge cases (default_prevented false). For a complex tool, this provides complete guidance.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, but the description adds critical constraints not in the schema: absolute paths required, max 10 files, 5242880 bytes each. It also explains the mimeType override behavior and clarifies that ref and selector are mutually exclusive. This adds significant value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool simulates dropping OS files onto an element identified by ref or selector. It distinguishes itself from sibling tools by detailing the DataTransfer mechanism and contrasting with apps needing native IPC paths. The verb 'simulate dropping' and the resource 'OS files onto an element' are specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use (simulate file drops) and when not to (apps requiring native OS paths via IPC). It also provides constraints like absolute paths, file limits, and timeout. However, it does not directly compare to sibling tools like electron_drag or electron_set_files, so some implicit guidance is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_existsCheck whether an element existsARead-only
Return whether the element identified by ref or selector is present in the DOM. A no-match is a normal result (exists: false), NOT an error — so an agent can poll for appearance/disappearance. Returns: { ok, session_id, exists }. Errors: TRANSPORT_UNSUPPORTED, NOT_RUNNING, BAD_ARGUMENT (invalid selector or ref+selector both/neither).
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond readOnlyHint=true, description reveals that no-match is a normal result (exists: false) not an error, and enumerates all error types. This provides significant behavioral clarity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three front-loaded sentences: purpose, key behavior (no-match non-error), then returns/errors. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, description fully covers return format, error types, and use case (polling). With annotations and high schema coverage, no gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description mentions 'ref OR selector' but schema already specifies this. No additional semantic detail beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the verb 'return' and resource 'whether element exists'. Distinguishes from siblings like electron_find (which returns element data) and visibility checks. No-match clarification clarifies scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly suggests polling use case for appearance/disappearance. Lists error conditions but omits when not to use (e.g., when needing visibility or text).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_expect_textExpect element textARead-only
Assert the text of the element identified by ref or selector matches a predicate, polling until it holds or timeoutMs elapses. Provide exactly one of: equals, contains, regex, not_equals, not_contains. Optional flags (any of i, m, s, u) apply to regex; g and y are rejected as stateful. Returns: { ok, session_id, matched, actual }. Errors: EXPECTATION_FAILED (predicate not met within timeoutMs — details carry expected + actual; retryable), REF_NOT_FOUND (stale ref; carries similar_refs), TRANSPORT_UNSUPPORTED, NOT_RUNNING, BAD_ARGUMENT (no/multiple predicates, invalid regex or flags, or ref+selector both/neither).
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| flags | No | Optional regex flags (any of i, m, s, u) applied to the regex predicate; g and y are rejected as stateful. Only valid alongside a regex predicate. | |
| regex | No | The text must match this JavaScript regular expression. | |
| equals | No | The text must equal this exactly. | |
| contains | No | The text must contain this substring. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Max poll time in ms before EXPECTATION_FAILED (default 5000, clamped to 60000). 0 = check once. | |
| not_equals | No | The text must NOT equal this. | |
| not_contains | No | The text must NOT contain this substring. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide readOnlyHint=true and openWorldHint=false, indicating a read-only side-effect-free operation. The description adds extensive behavioral context: polling semantics, timeout clamping, exact predicate matching, rejection of stateful regex flags (g, y), and detailed error payloads (similar_refs for stale refs, expected+actual for assertion failure). No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured: front-loaded with core purpose and polling behavior, then a clear bullet of predicate options, followed by flags and error categories. Each sentence serves a distinct purpose without redundancy. Length is justified by the parameter count and error complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description fully documents the return object ({ ok, session_id, matched, actual }) and all possible errors with sufficient detail for an agent to handle failures. It covers polling timeout, predicate constraints, and the ref/selector duality. For a tool with 10 parameters, this is comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the baseline is 3. However, the description adds critical semantic constraints beyond the schema: the mutual exclusivity of predicates ('exactly one'), the relationship between 'flags' and 'regex', and the behavior of timeoutMs (0 = check once). This enriches the agent's understanding of parameter interactions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: asserting text of an element via ref/selector with polling. It identifies the specific verb ('Assert'), resource ('text of the element'), and mechanism ('polling until it holds or timeoutMs elapses'). This distinguishes it from siblings like electron_get_text (retrieval without assertion) and other expect_ tools (e.g., expect_url, expect_state) which target different resources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit selection constraints: 'Provide exactly one of: equals, contains, regex, not_equals, not_contains' and clarifies flags applicability only to regex. It also details error types (EXPECTATION_FAILED, REF_NOT_FOUND, etc.) and their retryability. However, it does not explicitly contrast with alternatives like electron_get_text for cases where the agent might want to fetch text without assertion, though the sibling list implies differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_expect_valueExpect form control valueARead-only
Assert the value of the element identified by ref or selector matches a predicate, polling until it holds or timeoutMs elapses. Provide exactly one of: equals, contains, regex, not_equals, not_contains. Optional flags (any of i, m, s, u) apply to regex; g and y are rejected as stateful. Returns: { ok, session_id, matched, actual }. Errors: EXPECTATION_FAILED (predicate not met within timeoutMs — details carry expected + actual; retryable), REF_NOT_FOUND (stale ref; carries similar_refs), TRANSPORT_UNSUPPORTED, NOT_RUNNING, BAD_ARGUMENT (no/multiple predicates, invalid regex or flags, or ref+selector both/neither).
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| flags | No | Optional regex flags (any of i, m, s, u) applied to the regex predicate; g and y are rejected as stateful. Only valid alongside a regex predicate. | |
| regex | No | The text must match this JavaScript regular expression. | |
| equals | No | The text must equal this exactly. | |
| contains | No | The text must contain this substring. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Max poll time in ms before EXPECTATION_FAILED (default 5000, clamped to 60000). 0 = check once. | |
| not_equals | No | The text must NOT equal this. | |
| not_contains | No | The text must NOT contain this substring. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, and the description adds rich behavioral details: polling until timeout, the exact error types (EXPECTATION_FAILED, REF_NOT_FOUND, etc.) with their semantics and retryability, and timeout clamping. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense paragraph but front-loaded with the primary purpose. It could be slightly more structured (e.g., bullet points for predicates and errors), but every sentence adds value and there is no redundancy. Slightly lower for readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (10 parameters, no output schema), the description sufficiently covers return values (ok, session_id, matched, actual), all error types with conditions, and predicate rules. It is complete enough for an agent to use correctly without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. However, the description adds significant value beyond the schema: it explains mutual exclusivity of predicates, valid regex flags (rejecting stateful ones), the meaning of timeoutMs=0, and the return format. This is excellent parameter-level guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool asserts the value of an element against a predicate, with polling. It uses specific verbs ('assert') and resource ('form control value'), and distinguishes well from sibling tools like electron_expect_text or electron_expect_state which handle different checks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description specifies that exactly one predicate from a list must be provided, and explains flags for regex. However, it does not explicitly contrast with alternatives like electron_expect_text for text content, leaving some ambiguity about when to use this vs similar tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_force_killForce-kill Electron appADestructive
Forcefully kill a session (SIGKILL) and release it — the escape hatch when stop hangs. Pass sessionId to target a specific session. Returns: { ok, session_id, killed: true }. Errors: NOT_RUNNING (no such session; not retryable), BAD_ARGUMENT (multiple sessions live — pass sessionId).
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | No | Target session id. Omit when a single session is running. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate destructive nature. Description adds specific details: uses SIGKILL, returns {ok, session_id, killed: true}, lists error types. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: first captures purpose and use case, second covers return and errors. Every word earns its place; no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple destructive tool with one parameter, the description covers purpose, usage, return format, and error handling. Annotations handle safety profile. Complete for agent decision-making.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Single parameter 'sessionId' with 100% schema coverage. Description adds value by explaining that omission works when single session is active and that errors include BAD_ARGUMENT for multiple sessions without sessionId.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Describes a specific verb ('force kill'), resource ('session'), and context ('escape hatch when stop hangs'). Clearly distinguishes from sibling 'electron_stop' by stating it's the hard kill option.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
States when to use ('when stop hangs') and lists error conditions (NOT_RUNNING, BAD_ARGUMENT). Could be improved by explicitly stating when NOT to use (e.g., prefer stop first).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_get_attributeGet an element attributeARead-only
Return the value of attribute name on the element identified by ref or selector (null when the attribute is absent — that is not an error). Returns: { ok, session_id, value }. Errors: REF_NOT_FOUND / SELECTOR_NO_MATCH (carries similar_refs), TRANSPORT_UNSUPPORTED, NOT_RUNNING, BAD_ARGUMENT.
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| name | Yes | Attribute name, e.g. "href" or "aria-label". | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and openWorldHint=false. The description adds behavioral detail beyond annotations: returns null for absent attribute (not an error), lists specific error types, and describes the return format. This provides helpful context for safe operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is relatively concise with core purpose upfront. It includes error list and return format in a single paragraph. A bit dense but not overly verbose. Could be slightly more structured, but overall effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 parameters, no output schema, no nested objects), the description covers return values, error types, null behavior, and the element identification methods. It does not mention the mutual exclusivity of ref and selector, which is in the schema, but still provides sufficient context for correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers all 4 parameters with descriptions (100% coverage). The description itself does not add new parameter-level information beyond what the schema provides. Baseline 3 is appropriate as schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns the value of an attribute on an element, distinguishing it from sibling tools like get_text or get_value. It specifies the verb (return), resource (attribute on element), and handles the null case for absent attributes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains how to use it (by ref or selector) and mentions null behavior, but does not provide explicit guidance on when to use this tool over alternatives or when not to use it. Sibling tools are not referenced.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_get_stateGet an element’s full stateARead-only
Return the full state envelope of the element identified by ref or selector: { visible, enabled, disabled, checked, selected, expanded, pressed, focused, readonly, required, invalid, busy } plus its role and name. One call answers "is this clickable / checked / focused". Returns: { ok, session_id, ref, role, name, state }. Errors: REF_NOT_FOUND / SELECTOR_NO_MATCH (carries similar_refs), TRANSPORT_UNSUPPORTED, NOT_RUNNING, BAD_ARGUMENT (invalid selector or ref+selector both/neither).
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the description adds value by detailing the return shape (list of states, role, name) and listing possible errors (REF_NOT_FOUND, etc.). No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise: three sentences that front-load the main purpose, then list states and error types. Every sentence adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description fully explains the return value structure and all possible errors. For a simple read-only tool, this is complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description does not need to add much. It reiterates that ref or selector should be provided, not both, which is already implied by the schema descriptions. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool returns the full state envelope of an element, listing all boolean properties plus role and name. It clearly distinguishes from sibling tools like electron_expect_state or electron_get_attribute by being a comprehensive state query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a strong usage hint: 'One call answers is this clickable / checked / focused'. It implies use when multiple state properties are needed. However, it does not explicitly contrast with siblings like electron_expect_state (which asserts a state) or electron_exists, leaving some ambiguity about when to prefer this over alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_hoverHover an elementA
Hover the element identified by ref or selector (e.g. to reveal a tooltip or menu). Options: force, timeoutMs. Returns: { ok, session_id, target }. Errors: REF_NOT_FOUND / SELECTOR_NO_MATCH (carries similar_refs), ELEMENT_NOT_VISIBLE (retryable), NOT_RUNNING, BAD_ARGUMENT.
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| force | No | Bypass actionability checks (visibility/enabled/stable). Default false. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations (readOnlyHint=false) indicate mutation, and the description lists return fields and errors but does not elaborate on side effects like triggering UI events or actionability checks (e.g., force parameter behavior).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (one sentence plus a compact list), front-loading the core purpose without unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers purpose, parameters, returns, and errors. It lacks an explanation of the return object fields (ok, session_id, target) but given no output schema, the listing is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema coverage, the description adds no new parameter details beyond listing options (force, timeoutMs); the schema already sufficiently documents each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (hover), the target (element by ref or selector), and an example use case (reveal tooltip/menu), distinguishing it from sibling tools like click or drag.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a clear use context (reveal tooltip/menu) but does not explicitly state when not to use this tool or mention alternatives, leaving room for ambiguity among sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_keyPress a key or chordA
Press a key or chord (e.g. 'Enter', 'Control+A', 'ArrowDown'). Focuses ref/selector first when given; otherwise presses against the active element. For editors, click the visible content area first; reserve force:true for offscreen inputs that truly accept focus. Options: force, timeoutMs. Returns: { ok, session_id, key }. Errors: SELECTOR_NO_MATCH / REF_NOT_FOUND (carries similar_refs), ELEMENT_NOT_VISIBLE (retryable), NOT_RUNNING, BAD_ARGUMENT (ref+selector both).
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key or chord, e.g. 'Enter' or 'Control+A'. | |
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| force | No | Bypass actionability checks (visibility/enabled/stable). Default false. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate readOnlyHint=false, confirming mutation. The description adds valuable behavioral details: focus behavior, force usage, error types (including retryable ELEMENT_NOT_VISIBLE), and return values. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense paragraph that efficiently covers purpose, behavior, exceptions, and return values. It is front-loaded with the core action. Minor redundancy (e.g., repeating 'ref/selector') but overall concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (6 parameters, mutating action, multiple error types), the description covers all essential aspects: focus behavior, force guidelines, timeout, error conditions, and return format. Without an output schema, the return description suffices. Some details like sessionId are implicit but clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so each parameter has a description. The tool description adds context beyond the schema, such as the focusing logic for ref/selector and when to use force. The key parameter examples enhance understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states 'Press a key or chord' and provides concrete examples ('Enter', 'Control+A', 'ArrowDown'). It clearly distinguishes this tool from siblings like electron_keyboard_type (which types strings) and electron_press_sequence (which presses multiple keys), making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit when-to-use guidance: 'Focuses ref/selector first when given; otherwise presses against the active element.' It advises for editors to 'click the visible content area first' and warns to 'reserve force:true for offscreen inputs that truly accept focus.' This helps the agent decide between this tool and alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_keyboard_typeType text as real keystrokesA
Type text as real per-character keystrokes (fires keydown/keypress/input/keyup per char), unlike electron_type which sets the value directly. Focuses ref/selector first when given; otherwise types into the active element. For a code editor (Monaco / EditContext), the reliable path is electron_type_into_editor (it clicks the editor content area, e.g. '.monaco-editor .view-lines', then types into the focused editor) — do NOT target the hidden textarea, which modern editors ignore. force:true focuses an offscreen/aria-hidden input but a swallowed keystroke returns TYPE_NO_EFFECT. Options: force, timeoutMs. Returns: { ok, session_id, typed }. Errors: SELECTOR_NO_MATCH / REF_NOT_FOUND (carries similar_refs), ELEMENT_NOT_VISIBLE (retryable), TYPE_NO_EFFECT (typing changed nothing — use electron_type_into_editor), NOT_RUNNING, BAD_ARGUMENT.
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| text | Yes | The text to type, character by character. | |
| force | No | Bypass actionability checks (visibility/enabled/stable). Default false. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only provide readOnlyHint=false. The description adds substantial behavioral context: it explains the event sequence, focusing behavior (focuses ref/selector first, else active element), the effect of force:true on offscreen inputs, and specific error types (TYPE_NO_EFFECT with remedy, retryable ELEMENT_NOT_VISIBLE, etc.). This goes well beyond the annotation's minimal information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the key differentiator (real keystrokes vs value setting), then alternates between usage guidance, focusing behavior, force option, return value, and errors. Every sentence adds essential information without redundancy. It is concise given the complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers return format ({ok, session_id, typed}) and lists all possible errors. Given the tool's complexity (6 params, multiple behaviors), the description is thorough. However, it does not mention the maximum input length (10000 chars from schema) or the exact default timeout, but the schema provides these. Slight gap but overall complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value beyond the schema by explaining how 'force' bypasses actionability checks and that a swallowed keystroke returns TYPE_NO_EFFECT, and by clarifying the timeoutMs as an 'actionability budget'. However, it does not repeat parameter descriptions, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool types text as real per-character keystrokes, differentiating it from electron_type which sets the value directly. It also specifies the event sequence (keydown/keypress/input/keyup) and provides guidance on when to use electron_type_into_editor for code editors, making the purpose very clear and distinguishing it from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear when-to-use and when-not-to-use guidance: use for real keystrokes, but for code editors use electron_type_into_editor. It warns against targeting the hidden textarea in editors and explains the force:true option. It also references sibling tool electron_type_into_editor by name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_launchLaunch Electron appA
Launch an Electron app and start a driving session. Provide main (absolute path to the main-process entry) or executablePath. Set runtime:"project" to resolve Electron only from the operator-configured --app-root (requires main when resolving that runtime); explicit executablePath takes precedence. A server started with --demo supplies its packaged demo entry when both are omitted. Returns: { ok, session_id, transport, windows, renderer_ready, runtime_source }. Waits (up to readyTimeoutMs, default 5000) for the renderer DOM to finish its initial render, so a snapshot/find right after launch sees a populated app; renderer_ready:false means it was not confirmed in time (the session is still usable — retry the read, or wait_for_selector on an expected element). By default refuses a second launch while a session is live (pass allowMultiple: true to override). Errors: ALREADY_RUNNING (a session is live, or the concurrent-session cap is reached — stop one or pass allowMultiple; not retryable), ABSOLUTE_PATH_REQUIRED / FILE_NOT_FOUND (preflight; not retryable), BAD_ARGUMENT (neither main nor executablePath given; runtime:"project" without main when no executablePath is given, or without --app-root when resolving that runtime; a runtime-altering env var like NODE_OPTIONS; instrumentNative without main; or, when the server set --app-root, a main/executablePath/cwd outside that root), SINGLE_INSTANCE_LOCK (another app instance holds the lock; not retryable), LAUNCH_TIMEOUT (first window did not appear; retryable), TRANSPORT_UNSUPPORTED (no launch-capable transport).
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the spawned process. | |
| env | No | Environment variables for the spawned process. | |
| args | No | Extra CLI args appended after the entry. | |
| main | No | Absolute path to the app main-process JS entry. Required unless executablePath is given or the server configured a default demo entry. | |
| runtime | No | Use Electron resolved from the operator-configured --app-root. Resolving that runtime requires main; an explicit executablePath takes precedence. Default: the launch transport runtime. | |
| timeoutMs | No | Max wait for the first window. | |
| allowMultiple | No | Allow launching when a session already exists. Default false (single instance). | |
| executablePath | No | Absolute path to an Electron/app binary. Defaults to the bundled Electron. | |
| readyTimeoutMs | No | Max wait (ms) for the renderer DOM to finish its initial render before returning. Default 5000; 0 returns immediately with renderer_ready reflecting the instantaneous state. Capped at 60000 to stay under the dispatch timeout backstop. | |
| instrumentNative | No | Wrap the app main entry with fixed hooks installed before it runs, so startup Tray state is readable/invokable (native_trays / native_tray_invoke) and startup notifications can be captured with beforeArm. Off by default; runs no agent code. Requires main; executablePath-only launches cannot be instrumented. Launch transport only. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only indicate mutation (readOnlyHint: false) and constrained world (openWorldHint: false). The description adds extensive behavioral details: wait for renderer, error types with retryability, single-instance lock, timeout behavior, instrumentNative effects, and the fact that a session with renderer_ready:false is still usable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is detailed and well-structured, front-loading the main action. It is somewhat long but every sentence adds value. Minor room for improvement in brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 10 parameters, no output schema, and 30 sibling tools, the description comprehensively covers launch behavior, return values, error types, timeout, single instance handling, and caveats. It is fully complete for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds significant meaning: precedence rules (executablePath > runtime), context of runtime resolution, default readyTimeoutMs, cap at 60000, and concrete examples of instrumentNative behavior. This goes well beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Launch an Electron app and start a driving session,' specifying the verb (launch) and resource (Electron app). It details key parameters and distinguishes from siblings like electron_attach and electron_discover_running.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly contrasts launching vs. attaching, explains when to use allowMultiple or runtime, and provides guidance on retryability of errors. It includes concrete when-to-use and when-not-to-use advice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_press_sequencePress a sequence of keysA
Press each key in keys, in order (e.g. ['Control+A', 'Delete', 'Enter']). Focuses ref/selector first when given. For editors, click the visible content area first; reserve force:true for offscreen inputs that truly accept focus. Options: force, timeoutMs. Returns: { ok, session_id, keys }. Errors: SELECTOR_NO_MATCH / REF_NOT_FOUND (carries similar_refs), ELEMENT_NOT_VISIBLE (retryable), NOT_RUNNING, BAD_ARGUMENT (empty keys or ref+selector both).
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| keys | Yes | Ordered keys/chords to press. | |
| force | No | Bypass actionability checks (visibility/enabled/stable). Default false. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond annotations (readOnlyHint=false, openWorldHint=false), the description adds: focuses ref/selector first, force bypasses actionability checks, return structure { ok, session_id, keys }, and specific errors. This fully discloses behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: action statement, usage tip, parameters, return, errors. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description covers return format and errors. With 6 parameters and 1 required, it provides sufficient context for the agent to invoke correctly, including edge cases like empty keys or both ref and selector.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds meaning: 'Focuses ref/selector first' clarifies ref/selector usage, and 'reserve force:true for offscreen inputs' adds semantic nuance beyond the schema description of force.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Press' and resource 'each key in keys' with an example. It distinguishes from sibling tools like electron_key (single key) and electron_keyboard_type (typing text) by specifying sequential key pressing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit guidance is given: for editors, click the visible content area first; reserve force:true for offscreen inputs. It also implies when to use focus via ref/selector and lists error types like ELEMENT_NOT_VISIBLE which aids retry decisions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_screenshotCapture a screenshotARead-only
Capture a screenshot to an image file and return its path (the image is written on the server host; the bytes are NOT returned inline). With ref/selector, captures just that element; otherwise the targeted window (windowId > windowTitle > windowIndex, default the active window) with optional fullPage or clip. Options: format (png|jpeg), quality (jpeg), path (absolute file) or dir (absolute directory, generated filename). With neither, writes to the server --screenshot-dir if configured, else the OS temp dir — pass dir or set --screenshot-dir for a stable, retrievable artifact location. Returns: { ok, session_id, path, bytes, format, width?, height? } (path is the absolute file written). Errors: ABSOLUTE_PATH_REQUIRED (relative path), REF_NOT_FOUND (no such window), SELECTOR_NO_MATCH (element not found), SURFACE_UNSUPPORTED (iframe element crops are not window-relative), NOT_RUNNING, BAD_ARGUMENT (invalid selector/options).
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | Absolute output DIRECTORY; the filename is generated. Use this (or the server --screenshot-dir default) for a stable, per-session artifact location instead of the OS temp dir. Mutually exclusive with path. | |
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| clip | No | Explicit capture rectangle in CSS pixels (window capture only). | |
| path | No | Absolute output file path. Takes precedence over dir / the server default. | |
| format | Yes | Image format. Default png. | png |
| quality | No | JPEG quality 0-100 (jpeg only). | |
| fullPage | No | Capture the full scrollable page (window capture only). | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| windowId | No | Target window transport id (highest precedence). | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| windowIndex | No | Target window by 0-based index. | |
| windowTitle | No | Target window by exact title. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide readOnlyHint=true which aligns with screenshot being non-destructive. The description adds significant context: image is written server-side, bytes not returned inline, error types, and return format. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is fairly long but well-structured: summary, then targeting, options, output, errors. Front-loaded with core action. Some redundancy (e.g., mentioning dir twice) but overall efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 12 params and no output schema, the description is thorough. It covers targeting, output details (with field names), error types, and server configuration. All necessary context is provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 12 parameters are in schema (100% coverage). The description adds essential semantics: mutual exclusivity of dir/path, ref/selector, windowId precedence, format defaults, quality applicability. This goes well beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states 'Capture a screenshot to an image file and return its path', clearly specifying the verb and resource. It distinguishes from sibling tools like electron_snapshot by focusing on image capture.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear guidance on targeting (ref/selector vs window, windowId precedence) and output options (dir vs path, format, quality). It could be improved by explicitly stating when not to use this tool (e.g., for structured data extraction use electron_snapshot).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_snapshotSnapshot renderer accessibility treeARead-only
Capture the selected renderer surface accessibility tree: interactive elements (and landmarks) with role, name, state, bbox, and a stable ref. Pass since:"last" for only what changed since the previous snapshot (added/removed/changed + ref_map), interactiveOnly to drop landmarks, maxEntries to cap. format:"text" returns a compact one-line-per-entry rendering instead of JSON (5-10x fewer tokens): [ref] role "name" value=… flags, ~ marks recently-changed, [-] marks landmarks. Diffs default to a compact encoding (changed fields only; diffFormat:"full" restores complete prev/curr entries) and accept budgetTokens for server-side truncation that keeps interactive entries first. Each response carries renderer_reloaded so stale refs are detectable (P10). Refs are tagged on the DOM (data-sw-ref) so later interaction tools can act by ref. Closed shadow roots are opaque unless the app opts in: push each root onto window.__stagewright_closedShadowRoots at attachShadow time (or implement window.__stagewright_inspectShadow); their entries carry state.shadow_closed: true. Returns: { ok, surface_id, kind: "full" | "diff", snapshot?, diff?, snapshot_text?, diff_text?, diff_format?, renderer_reloaded, truncated }. Errors: NOT_RUNNING (no session — call electron_launch first; not retryable), BAD_ARGUMENT (multiple sessions live — pass sessionId).
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | Return only the delta since the previous snapshot for this session. | |
| format | No | Payload encoding. 'json' (default) returns the structured snapshot/diff objects. 'text' returns a compact one-line-per-entry rendering (5-10x fewer tokens): ref, role, quoted name, non-empty value/placeholder, and only NON-default state flags; ~ prefixes recently-changed entries, [-] marks non-targetable landmarks. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| diffFormat | No | Encoding for since:'last' diffs. 'compact' (default) carries only the changed fields per entry; 'full' carries complete prev/curr entries. Ignored when format:'text'. | |
| maxEntries | No | Cap the number of entries returned. Defaults to 2000. | |
| budgetTokens | No | Server-side token cap for a since:'last' diff payload. Lowest-value entries (non-interactive removed/changed first) are dropped until the estimate fits; _meta.truncated_entries reports how many were omitted. | |
| interactiveOnly | No | Return only interactive elements (drops landmarks) to save tokens. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint, description confirms read-only and adds rich behavior: diff encoding, text format, ref tagging, shadow root handling, truncation, and return fields. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is somewhat verbose but efficiently front-loads purpose. Every sentence adds useful info; could be tighter but appropriate for complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, description explicitly lists return fields (ok, surface_id, kind, snapshot, diff, etc.) and covers errors, special modes, and edge cases (shadow roots). Complete for a 7-param tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema coverage, description adds meaning: 'since' explains delta, 'format' details token savings, 'budgetTokens' describes truncation logic. Adds significant value beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Capture the selected renderer surface accessibility tree' with specific elements (role, name, state, bbox, ref). Distinct from sibling tools like electron_click or electron_get_state.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives context for when to use parameters (since, format, interactiveOnly, etc.) and mentions errors (NOT_RUNNING, BAD_ARGUMENT) with prerequisites. Lacks explicit comparison to siblings but purpose is obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_statusElectron Stagewright statusARead-only
Return compact orientation for this server: version, uptime, active-session count, and each live session's transport, renderer readiness, selected surface, last stable error code, and non-default dialog policy. It never returns window arrays, logs, stack traces, dialog entries, prompt text, or plugin payloads. Use electron_windows_list, electron_surfaces_list, or the relevant plugin tool for detailed state. Returns: { ok, server: { version, uptime_ms }, active_sessions, sessions }. Errors: none.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond readOnlyHint, describes exact return fields and explicitly lists what is not returned (window arrays, logs, stack traces, etc.). Also states errors are none, adding significant behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured: front-loads purpose, lists exclusions, provides alternatives, then return format and error info. Each sentence adds value, though slightly verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Fully describes what the tool returns and what it excludes. With no parameters, complete annotations, and no output schema, the description provides all necessary context for an agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so baseline is 4. Description doesn't need to explain parameters; it correctly omits any param discussion.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it returns compact orientation with specific fields: version, uptime, active-session count, and session details. Distinguishes from siblings by explicitly stating what it never returns and naming alternative tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance: use for compact status; for detailed state, use electron_windows_list, electron_surfaces_list, or relevant plugin tool. No ambiguity about when to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_stopStop Electron appADestructive
Gracefully stop a session and release it. If the app ignores the close within timeoutMs (default 10s) the stop auto-escalates to SIGKILL, so the process is always reaped and never left orphaned; the response reports escalated: true when that happened. Pass sessionId to target a specific session. Returns: { ok, session_id, stopped: true, escalated }. Errors: NOT_RUNNING (no such session; not retryable), BAD_ARGUMENT (multiple sessions live — pass sessionId).
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Graceful-close budget in ms before escalating to SIGKILL. Defaults to 10000. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate destructive behavior, but the description adds vital details: auto-escalation to SIGKILL, timeout, response fields, and specific errors, providing thorough behavioral insight.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, front-loaded with the primary action, and efficiently covers details, return values, and errors in a structured manner.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all necessary context: usage, parameters, return values, escalation behavior, and errors, making it complete for a stop tool with no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline 3. The description adds meaning for 'sessionId' (omit if single session) and 'timeoutMs' (graceful closing budget), raising the score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'stop' and resource 'session', and distinguishes it from siblings like 'electron_force_kill' by emphasizing graceful stop with auto-escalation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context for when to use (stop a session) and error conditions (NOT_RUNNING, BAD_ARGUMENT). It could explicitly mention when to use 'electron_force_kill' instead, but the graceful vs force distinction is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_surfaces_listList Electron renderer surfacesARead-only
List the session renderer surfaces in parent-first order: BrowserWindow roots, WebContentsViews, webview guests, and iframe children. Each opaque id is stable only while its surface stays live; select it with electron_switch_surface before snapshot/find/renderer interactions. Returns: { ok, session_id, surfaces, active_surface_id, count }. Existing window tools remain compatible for window-only flows. Errors: TRANSPORT_UNSUPPORTED (surface targeting is unavailable on this transport; not retryable), NOT_RUNNING, BAD_ARGUMENT (multiple sessions).
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | No | Target session id. Omit when a single session is running. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and openWorldHint=false. Description adds that opaque ids are stable only while surface is live, need to select with switch_surface, and details return structure. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Five sentences front-loaded with purpose, then usage, return, and errors. Every sentence adds value; no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one optional parameter and no output schema, description provides return structure, error conditions, and usage guidance. Sufficient for agent to understand invocation and results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers sessionId with description; description adds 'Omit when a single session is running' and mentions errors for multiple sessions, adding context beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states verb 'List', resource 'session renderer surfaces', and specifies order and types (BrowserWindow roots, WebContentsViews, etc.). Differentiates from sibling tools by mentioning relationship to electron_switch_surface and existing window tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use (before snapshot/find/renderer interactions) and when not to use (window-only flows). Lists error conditions with guidance on retryability and provides context for optional sessionId.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_switch_surfaceSwitch active renderer surfaceA
Select a live renderer surface by the opaque id returned by electron_surfaces_list. Following snapshot, find, renderer reads/eval, waits, expectations, and interactions target that surface; a ref from a different surface is rejected rather than reused. Returns: { ok, session_id, active, active_surface_id }. Errors: SURFACE_NOT_FOUND (the id was never observed in this session), SURFACE_CLOSED (it detached or closed), SURFACE_UNSUPPORTED (the live surface cannot be driven), TRANSPORT_UNSUPPORTED, NOT_RUNNING, BAD_ARGUMENT.
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | No | Target session id. Omit when a single session is running. | |
| surfaceId | Yes | Opaque id returned by electron_surfaces_list. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that the surface must be from electron_surfaces_list, that old refs from other surfaces are rejected, and lists possible errors. Since annotations only indicate not read-only, the description provides necessary behavioral details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise: three sentences covering purpose, effect, return, and errors. No redundant information, all sentences earn their place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given two parameters, no output schema, and minimal annotations, the description explains the effect on subsequent operations and error conditions well. Some context about state management could be added, but sufficient for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions, providing baseline 3. Description adds value by clarifying surfaceId's source and sessionId's optionality, enhancing understanding beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it selects a live renderer surface using an opaque ID from electron_surfaces_list. Explains that subsequent operations target that surface, distinguishing it from sibling tools like electron_surfaces_list.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies when to use by stating that operations like snapshot and interactions target the switched surface. Explicitly notes that references from different surfaces are rejected. Could be more precise about when not to use, but adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_switch_windowSwitch active Electron windowA
Select the active window by precedence targetId > windowTitle > index > default. The selection changes Stagewright's renderer target; it does not promise native OS foreground focus. Returns: { ok, session_id, active, active_window_id } on success. Errors: REF_NOT_FOUND (no window matched; not retryable), TRANSPORT_UNSUPPORTED (transport has no renderer window target; not retryable), NOT_RUNNING, BAD_ARGUMENT (multiple sessions).
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | 0-based window index (third precedence). | |
| targetId | No | Transport window id (highest precedence). | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| windowTitle | No | Exact window title (second precedence). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate readOnlyHint=false, and the description adds that it changes the renderer target without promising OS focus. It also lists error types. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences and an error list, front-loaded with the main purpose. No superfluous text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given moderate complexity, the description covers return format, errors, and behavioral nuance. It is nearly complete for agent invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers all 4 parameters with descriptions. The tool description adds the precedence order and notes that sessionId can be omitted for single sessions, adding value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it selects the active window with a defined precedence order. It distinguishes the tool's action from siblings like electron_switch_surface but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what the tool does and does not do (no OS focus guarantee) and lists errors. However, it does not specify when to use this tool vs sibling tools like electron_switch_surface.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_uncheckUncheck a checkboxA
Uncheck the checkbox identified by ref or selector (no-op if already unchecked). Options: force, timeoutMs. Returns: { ok, session_id, target, checked: false }. Errors: REF_NOT_FOUND / SELECTOR_NO_MATCH (carries similar_refs), ELEMENT_NOT_VISIBLE (retryable), ELEMENT_DISABLED, NOT_RUNNING, BAD_ARGUMENT.
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a snapshot (resolves to [data-sw-ref="N"]). Provide ref OR selector. | |
| force | No | Bypass actionability checks (visibility/enabled/stable). Default false. | |
| selector | No | CSS selector. Provide ref OR selector, not both. | |
| sessionId | No | Target session id. Omit when a single session is running. | |
| timeoutMs | No | Actionability budget in ms (default 5000, clamped to 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses no-op behavior, options (force, timeoutMs), return shape, and error types with retryability hints. Annotations are minimal, so description fully carries behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence covering purpose, options, returns, and errors. Concise but could benefit from structured sections for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Includes return value shape and key errors given no output schema. Covers most behavioral aspects, though 'actionability checks' could be elaborated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline 3. Description lists options but doesn't add new semantics beyond what schema already provides for each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb 'uncheck' and resource 'checkbox', with identification via ref or selector. Distinguishes from sibling tool 'electron_check' which does the opposite.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance. The 'no-op if already unchecked' implies idempotency, but no differentiation from alternatives like 'electron_click'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
electron_waitWait a fixed durationARead-only
Pause for ms milliseconds (clamped to 60000). Prefer electron_wait_for_state or electron_wait_for_selector — a fixed wait is slower and more brittle than waiting on a condition. Returns: { ok, session_id, waited_ms }. Errors: NOT_RUNNING (no session), BAD_ARGUMENT (multiple sessions).
| Name | Required | Description | Default |
|---|---|---|---|
| ms | Yes | Milliseconds to wait (clamped to the max). | |
| sessionId | No | Target session id. Omit when a single session is running. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses return format, error types (NOT_RUNNING, BAD_ARGUMENT), and clamping behavior. Annotations already indicate readOnlyHint=true, and description adds context on error conditions and return value, with no contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no redundant text. Front-loads purpose, then usage guidance, then return/errors. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple fixed-wait tool, the description covers purpose, alternatives, parameters, return value, and error cases. No output schema needed; return format is described.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers both parameters (ms, sessionId). Description adds 'clamped to 60000' for ms and guidance for sessionId: 'Omit when a single session is running.' Also explains BAD_ARGUMENT error related to sessionId.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Pause for ms milliseconds' and distinguishes from siblings by recommending electron_wait_for_state and electron_wait_for_selector. It specifies verb (pause), resource (milliseconds), and scope (clamped).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises against using this tool for condition-based waiting: 'Prefer electron_wait_for_state or electron_wait_for_selector — a fixed wait is slower and more brittle.' Also notes error conditions for multiple sessions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
30 tool updates
v0.4.1- Removed
electron_detach - Added
electron_doctor - Removed
electron_drag - Removed
electron_elements_list - Removed
electron_expect_count - Removed
electron_expect_state - Removed
electron_expect_url - Removed
electron_expect_visible - Removed
electron_find - Removed
electron_focused_element - Removed
electron_get_bbox - Removed
electron_get_computed_style - Removed
electron_get_text - Removed
electron_get_value - Removed
electron_info - Removed
electron_inject - Changed
electron_launch2 fields changed- changed
Input schema / properties / main / descriptionPrevious value: -"Absolute path to the app main-process JS entry. Required unless executablePath is given."New value: +"Absolute path to the app main-process JS entry. Required unless executablePath is given or the server configured a default demo entry." - added
Input schema / properties / runtimeAdded value: +{ + "description": "Use Electron resolved from the operator-configured --app-root. Resolving that runtime requires main; an explicit executablePath takes precedence. Default: the launch transport runtime.", + "enum": [ + "project" + ], + "type": "string" +}
- Removed
electron_scroll - Removed
electron_scroll_into_view - Removed
electron_select_option - Removed
electron_set_files - Added
electron_status - Added
electron_surfaces_list - Added
electron_switch_surface - Removed
electron_type - Removed
electron_type_into_editor - Removed
electron_wait_for_event - Removed
electron_wait_for_selector - Removed
electron_wait_for_state - Removed
electron_windows_list
3 tool updates
v0.2.0- Changed
electron_find1 field changed- added
Input schema / properties / limitAdded value: +{ + "description": "Cap the matches returned (in document order); count still reports the true total so a truncation is detectable. Unset returns every match.", + "maximum": 9007199254740991, + "minimum": 1, + "type": "integer" +}
- Changed
electron_launch2 fields changed- changed
Input schema / properties / readyTimeoutMs / descriptionPrevious value: -"Max wait (ms) for the renderer DOM to finish its initial render before returning. Default 5000; 0 returns immediately with renderer_ready reflecting the instantaneous state."New value: +"Max wait (ms) for the renderer DOM to finish its initial render before returning. Default 5000; 0 returns immediately with renderer_ready reflecting the instantaneous state. Capped at 60000 to stay under the dispatch timeout backstop." - changed
Input schema / properties / readyTimeoutMs / maximumPrevious value: -9007199254740991New value: +60000
- Changed
electron_snapshot2 fields changed- changed
Input schema / properties / diffFormat / descriptionPrevious value: -"Encoding for since:'last' diffs. 'compact' (default) carries only the changed fields per entry; 'full' carries complete prev/curr entries."New value: +"Encoding for since:'last' diffs. 'compact' (default) carries only the changed fields per entry; 'full' carries complete prev/curr entries. Ignored when format:'text'." - added
Input schema / properties / formatAdded value: +{ + "description": "Payload encoding. 'json' (default) returns the structured snapshot/diff objects. 'text' returns a compact one-line-per-entry rendering (5-10x fewer tokens): ref, role, quoted name, non-empty value/placeholder, and only NON-default state flags; ~ prefixes recently-changed entries, [-] marks non-targetable landmarks.", + "enum": [ + "json", + "text" + ], + "type": "string" +}
51 tool updates
v0.0.0- First observed
electron_assert_pattern - First observed
electron_attach - First observed
electron_check - First observed
electron_clear_input - First observed
electron_click - First observed
electron_console_logs - First observed
electron_detach - First observed
electron_dialog_handler - First observed
electron_discover_running - First observed
electron_drag - First observed
electron_drop_file - First observed
electron_elements_list - First observed
electron_exists - First observed
electron_expect_count - First observed
electron_expect_state - First observed
electron_expect_text - First observed
electron_expect_url - First observed
electron_expect_value - First observed
electron_expect_visible - First observed
electron_find - First observed
electron_focused_element - First observed
electron_force_kill - First observed
electron_get_attribute - First observed
electron_get_bbox - First observed
electron_get_computed_style - First observed
electron_get_state - First observed
electron_get_text - First observed
electron_get_value - First observed
electron_hover - First observed
electron_info - First observed
electron_inject - First observed
electron_key - First observed
electron_keyboard_type - First observed
electron_launch - First observed
electron_press_sequence - First observed
electron_screenshot - First observed
electron_scroll - First observed
electron_scroll_into_view - First observed
electron_select_option - First observed
electron_set_files - First observed
electron_snapshot - First observed
electron_stop - First observed
electron_switch_window - First observed
electron_type - First observed
electron_type_into_editor - First observed
electron_uncheck - First observed
electron_wait - First observed
electron_wait_for_event - First observed
electron_wait_for_selector - First observed
electron_wait_for_state - First observed
electron_windows_list
TDQS
Scored across 30 tools
Tools are well-differentiated with clear purposes, though the keyboard-related tools (key, keyboard_type, press_sequence) could cause slight confusion; descriptions help disambiguate.
All tools follow a consistent electron_verb_noun pattern with lowercase snake_case, making naming predictable and easy to follow.
30 tools is above the typical well-scoped range of 3-15, but given the extensive domain of Electron automation, the count is borderline heavy rather than excessive.
The tool surface covers the full lifecycle: launch/attach, interaction, reads, assertions, diagnostics, and surface management, with no obvious gaps for the intended purpose.
Maintenance
Related MCP Connectors
Browser-based QA for AI-built software. Test pages with real browsers via agents.
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
- openhelmOAuthai.openhelm
Autonomous cloud agent tasks: real browser + your tools, structured evidence-backed results.
Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
Related MCP Servers
- AlicenseAqualityBmaintenancePlaywright for the entire OS. Give AI agents eyes and hands on any desktop app — find, click, type, and read UI elements across Linux, macOS, and Windows.2730 PyPI47MIT
- AlicenseAqualityDmaintenanceDrive Electron apps from AI agents via MCP - click, type, drag, screenshot, eval JS, and more.399 npm3MIT
- AlicenseCqualityDmaintenanceEnables AI coding tools to interact with Electron applications for automated testing, including app lifecycle, element interaction, and visual testing.488 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to autonomously interact with and test web applications in a real browser, providing DOM/Accessibility tree extraction, runtime telemetry, screenshot capture, and Markdown test reports.22 npm1MIT