Skip to main content
Glama

dom_inspect

Inspect a DOM element's bounding box, computed CSS styles, attributes, text, and child count to understand its structure before making changes.

Instructions

Inspect a DOM element: bounding box, computed CSS styles, attributes, text content, children count. Use this to understand element structure before making changes.

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": "dom_inspect"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPage URL. Auto-detected if omitted.
reloadNoForce page reload. Default: true on first call.
selectorYesCSS selector of element to inspect. Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description bears the full burden. It conveys that this is a read/inspect operation and usefully lists the returned fields, but it never mentions that the tool may navigate to a URL or trigger a page reload (the reload parameter defaults to true on first call), which is a state-affecting side effect an agent should know about before invoking it.

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?

Two compact sentences with the resource and return payload front-loaded, followed by a brief usage note. Nothing is padded, though the second sentence is generic enough that it borders on filler.

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

Completeness4/5

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

With no output schema, enumerating the returned fields is the right compensation and it is done well. The main omission is the reload/navigation side effect, which matters for a tool that can reset page state; otherwise the definition covers what an agent needs to call it correctly.

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 description coverage is 100%, with url, reload, and selector all documented in the schema, so the baseline is 3. The description adds nothing about parameter meaning or format beyond the phrase "DOM element," which is already implied by the tool name.

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

Purpose4/5

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

The description names a specific verb (Inspect) and resource (DOM element) and enumerates what it returns: bounding box, computed CSS styles, attributes, text content, children count. This distinguishes it from write/interaction siblings, though it never explicitly contrasts itself with page_outline or accessibility, which likely overlap on structure information.

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

Usage Guidelines3/5

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

"Use this to understand element structure before making changes" gives a clear if minimal usage context: it is a pre-mutation reconnaissance step. There is no statement of when NOT to use it, and no named alternative for cases where a whole-page outline or accessibility tree would be the better choice.

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