Skip to main content
Glama

inspect_dom

Identify any element's tag, attributes, CSS path, and subtree, optionally including HTML, to debug or analyze page structure quickly.

Instructions

Inspect an element's tag, attributes, css path, subtree, and (optionally) HTML

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNo
by_textNo
selectorNo
max_depthNo
include_htmlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Without annotations, the description carries the disclosure burden. It reasonably implies a read-only inspection and enumerates what will be returned (tag, attributes, CSS path, subtree, optional HTML). However, it does not disclose behavior on missing elements, whether the page is modified, or how max_depth affects the returned subtree, leaving partial but not complete transparency.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler or redundant information. Every word contributes to defining what the tool inspects, and the optional HTML clause is compactly handled.

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?

The tool has 5 parameters, no output schema, and no annotations, so the description needs to explain both targeting and return behavior. It provides a useful summary of the returned data, but leaves the parameter semantics, error cases, and the meaning of max_depth/include_html under-specified, making the tool not reliably callable by an agent without guessing.

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?

The schema has 0% description coverage, and the description does not define the core targeting parameters: scope, by_text, and selector. Only loose hints exist, such as 'optionally HTML' mapping to include_html and 'subtree' mapping to max_depth, but an agent cannot reliably determine how to specify which element to inspect.

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

Purpose5/5

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

The description uses a specific verb ('Inspect') and names the exact resource: an element's tag, attributes, CSS path, subtree, and optionally HTML. This clearly identifies it as an element-level introspection tool and separates it from page-level siblings like get_page_content or read_page and from action tools like click/type.

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?

No explicit when-to-use guidance or alternative selection is provided. An agent must infer from the verb 'Inspect' that this is for element inspection, and the description does not say when to prefer it over sibling tools like list_elements, get_page_content, or read_page, nor does it mention prerequisites such as a loaded page.

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