Skip to main content
Glama
Browser MCP Server

Browser MCP Server

get_accessibility_tree

Retrieves a compact accessibility tree for a browser page, helping AI agents inspect page structure and accessible elements for navigation and interaction.

Instructions

Get compact accessibility tree.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_accessibility_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdNo
maxLengthNoMax chars (default: 4000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.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 carries the full behavioral burden, and "compact" is the only hint at behavior. It does not state that output is truncated by default (4000 chars), what the tree format looks like, whether hidden elements are included, or what happens with an invalid pageId.

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 zero padding, but it is under-specified rather than concise in a useful way. There is room for one more sentence on truncation and page targeting without bloat.

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?

With zero annotations, no output schema, and an undocumented required-free pageId, the definition should do more work than this. An agent cannot tell from it what it will receive or how to control size and target page beyond guessing from parameter names.

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?

Schema coverage is 50%: maxLength is documented in the schema, but pageId has no description anywhere. The description does not compensate by explaining which page pageId selects or how it defaults when omitted, nor does it connect "compact" to the maxLength truncation.

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

Purpose3/5

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

"Get compact accessibility tree" names a specific verb and resource, so the agent knows it retrieves an a11y tree rather than HTML or text. However, it offers no differentiation from nearby siblings such as get_page_content, get_page_html, or get_page_summary, leaving the agent to infer why an accessibility tree is the right artifact.

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?

There is no when-to-use guidance, no prerequisites, and no mention of alternatives. The agent gets no signal about when an accessibility tree beats other page-inspection tools or whether a browser session/page must already be open.

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