Skip to main content
Glama
AMARA-Khaled

wrave-mcp

by AMARA-Khaled

wrave_get_dom_tree

Extract a clean, LLM-friendly DOM tree with bounding boxes and interactive element metadata for a specified tab, optionally including full HTML and configurable nesting depth.

Instructions

Extract clean, LLM-friendly DOM tree with bounding boxes [x, y, w, h] and interactive element metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlNoReturn full HTML if true
tab_idYesThe ID of the tab
max_depthNoMax tree nesting depth

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It mentions 'clean, LLM-friendly' and the inclusion of bounding boxes and metadata, which hints at a processed output rather than raw HTML, but it does not explicitly state whether the operation is read-only, whether it can be resource-intensive, or any limitations (e.g., max_depth effects). The description adds some context beyond a bare 'get DOM tree' but omits critical safety and side-effect information.

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 that immediately states the core purpose and key output features. There is no redundant phrasing or filler. It efficiently conveys what the tool does and what to expect, making it easy for an agent to parse quickly.

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?

The description provides a solid summary of the return value ('clean, LLM-friendly DOM tree' with bounding boxes and interactive metadata), which is important since there is no output schema. However, it does not explain how the parameters (like max_depth or html) affect the result, nor does it mention any performance considerations or constraints. Given the simplicity of the tool and the schema coverage, this is reasonably complete but not exhaustive.

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%, meaning all three parameters (tab_id, html, max_depth) are already documented in the schema with types, defaults, and short descriptions. The tool description does not add any additional parameter-specific meaning (e.g., how max_depth affects output or what 'html' toggles). Since the schema carries the load, the baseline of 3 is appropriate.

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 clearly states the action (extract), the resource (DOM tree), and adds specific distinguishing details: 'clean, LLM-friendly', 'bounding boxes [x, y, w, h]', and 'interactive element metadata'. This differentiates it from sibling tools like wrave_get_accessibility_tree (which focuses on accessibility) and wrave_get_snapshot (which may be a broader capture). The purpose is unambiguous and actionable.

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 guidance is provided on when to use this tool versus alternatives such as wrave_get_accessibility_tree or wrave_get_snapshot. The description only states what it does, not the conditions that would favor this tool over others. An agent must infer usage from the name and description alone, which is insufficient for optimal tool selection.

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