Skip to main content
Glama

analyze_dom_structure

Analyzes the DOM of a stored page to identify interactive elements, content areas, and navigation patterns based on a given goal. Supports focus areas and tree depth.

Instructions

AI-guided exploration and analysis of DOM structure using goal-oriented patterns. Analyzes stored DOM JSON to identify interactive elements, content areas, and navigation patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYesUnique identifier of the page to analyze
analysis_goalNoSpecific goal for DOM analysis (e.g., 'find login form', 'locate navigation menu')
focus_areasNoSpecific areas to focus on (e.g., ['forms', 'navigation', 'content'])
max_depthNoMaximum depth to analyze in DOM tree
Behavior2/5

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

With no annotations provided, the description must fully disclose behavioral traits, but it only states that the tool analyzes stored data. It does not confirm read-only behavior, disclose side effects, or address permissions, leaving significant ambiguity.

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?

The description is concise with two sentences, efficiently conveying the core purpose. However, it could be more structured by explicitly listing what it identifies, but there is no wasted text.

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?

Given the absence of an output schema and annotations, the description is adequate but incomplete. It does not explain return values, prerequisites (e.g., that the page must already be stored), or how the AI guidance works, leaving gaps for a complex tool.

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?

All four parameters are described in the input schema (100% coverage), so the description adds minimal extra semantics. The description's mention of 'goal-oriented patterns' provides context but does not clarify parameter usage beyond what the schema already offers.

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 clearly states the tool analyzes stored DOM JSON to identify interactive elements, content areas, and navigation patterns. It specifies the action (analyze) and resource (DOM structure) but does not explicitly differentiate from sibling tools like search_dom_elements or navigate_dom_path, leading to a score of 4.

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 offers no guidance on when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. It only implies usage for DOM analysis, which is insufficient for an agent to make informed decisions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZachHandley/ZMCPTools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server