Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

query_selector

Read-only

Query DOM nodes using a CSS selector and return tag, ID, class, and text summaries to inspect Electron app pages during debugging.

Instructions

Query DOM nodes with document.querySelectorAll and return tag/id/class/text summary

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "query_selector"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
selectorYesCSS selector
targetIdNo
processIdNoTarget process ID. Omit if only one app is running.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.1

TDQS

B3/5.0
Behavior3/5

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

The readOnlyHint=true annotation is consistent with a query operation, so the safety profile is already covered. The description adds useful behavior beyond that by disclosing the returned summary fields (tag/id/class/text), but says nothing about whether text is truncated, how results are capped by limit, or what happens when the selector matches nothing.

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

Conciseness4/5

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

A single sentence, front-loaded with the operation and mechanism, with zero filler. It is efficient, though it spends its few words on implementation detail rather than on the unstated behavioral constraints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only 4-parameter tool with no output schema, the description should carry more weight: it does sketch the return shape, but leaves limit behavior, targetId, and empty-result handling unaddressed. It is adequate but has clear gaps an agent would hit on first invocation.

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

Parameters2/5

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

Schema description coverage is 50%: selector is documented as "CSS selector" and targetId has no description at all. The description does not compensate for the gap — it never mentions limit (the cap of 100), targetId, or that processId may be omitted when only one app is running, so three of four parameters carry no added meaning.

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

Purpose4/5

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

States a specific verb and resource ("Query DOM nodes") and names the concrete mechanism (document.querySelectorAll) plus the return shape. It is unambiguous on its own, though it never distinguishes itself from siblings like evaluate or assert_ui that also touch the DOM.

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

Usage Guidelines2/5

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

The description gives no when-to-use context, no prerequisites (e.g., that a page must be loaded or a target attached), and no exclusions pointing to alternatives such as evaluate for arbitrary JS or assert_ui for verification. The agent must infer usage from the name alone.

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

Deploy Server

Other Tools