Skip to main content
Glama
Playwright DevTools MCP Server

Playwright DevTools MCP Server

by ariangibson

debug_get_element_properties

Inspect a specific DOM element to retrieve attributes, dimensions, computed styles, accessibility data, parent chain, and event listeners for deep debugging.

Instructions

Get comprehensive properties of a specific element for deep debugging analysis

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": {
      "contextId": "<contextId>",
      "selector": "<selector>"
    },
    "name": "debug_get_element_properties"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorYesCSS selector to target the element for inspection
contextIdYesBrowser context ID from browser_launch
includeAttributesNoInclude all element attributes
includeDimensionsNoInclude element dimensions and positioning
includeParentChainNoInclude parent element chain up to body
includeAccessibilityNoInclude accessibility properties (ARIA, roles, etc.)
includeComputedStylesNoInclude computed CSS styles
includeEventListenersNoInclude attached event listeners (if detectable)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and mostly does not meet it. It does not say what happens when the selector matches multiple elements, whether the call is read-only and side-effect free, how large or expensive the result is with all include flags defaulted on, or whether the required context must be an active browser context.

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

Conciseness3/5

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

A single front-loaded sentence with no wasted clauses, which is structurally sound. However, the descriptors 'comprehensive' and 'deep debugging analysis' are filler that occupy the only sentence without conveying operative information.

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

Completeness2/5

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

For an eight-parameter debugging tool with no annotations and no output schema, the description is far too thin. An agent cannot tell from the definition alone what the response looks like, how to interpret a selector that matches nothing or matches several nodes, or what to expect from the optional include flags at call time.

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

Parameters3/5

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

Schema coverage is 100%, so every one of the eight parameters is already documented in the schema with defaults. The description adds no meaning beyond that, such as which include flags are mutually relevant or when to turn them off for performance, so the baseline of 3 applies.

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: get properties of a specific element. That distinguishes it from debug_get_dom_tree and debug_get_page_source at a coarse level, but the description never names those siblings or states the scoping difference explicitly.

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?

'For deep debugging analysis' is a vague framing rather than actionable guidance. There is no indication of when to prefer this over debug_get_dom_tree or debug_get_page_source, and no precondition such as the element needing to exist or the selector needing to resolve.

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