Skip to main content
Glama

Robot Actions — Remote Device Control

android_devtools_get_dom

Get the outer HTML of the page (or a CSS-selector-matched element) running on the device via CDP. Output is capped at 100 000 characters; a truncation notice is appended when the limit is hit. Omit pageId to auto-select the visible/active page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesDevice serial number (UDID)
pageIdNoTarget page id (auto-picked when omitted)
socketNoAbstract unix socket name (default: chrome_devtools_remote)
selectorNoOptional CSS selector — returns outerHTML of the first matching element, or null if not found

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It reveals the output cap of 100,000 characters and the appended truncation notice, and explains the auto-selection of pageId when omitted. This adds meaningful behavioral context beyond the schema, though it does not cover potential errors or prerequisites like CDP connectivity.

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 three concise sentences, with the main purpose stated first, followed by output limit and auto-selection guidance. No fluff or redundancy; every sentence contributes essential information.

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 tool is a straightforward read operation, and the description covers the primary purpose, output constraints, and a key parameter behavior. The schema fully documents all parameters. Missing details like error handling or explicit read-only status are minor given the tool's simplicity, but it could still benefit from noting that it returns the page's HTML without modifying anything.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the description need not repeat parameter details. It adds value by explicitly stating that omitting pageId auto-selects the visible/active page, reinforcing the schema's note. It also clarifies the selector's behavior via the schema, but the description's truncation notice is output-focused. Overall, the description complements the schema effectively.

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 it retrieves the outer HTML of the page or a CSS-selector-matched element via CDP, which is specific and distinct from sibling tools like android_devtools_elements or webpage_get_dom by its explicit scope and CDP mechanism. It directly answers what the tool does.

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?

The description gives guidance on omitting pageId to auto-select the active page, which is useful context for parameter usage. However, it does not explicitly state when to use this tool versus alternatives (e.g., when to use android_devtools_elements or other DOM-related tools), leaving the agent to infer usage from the name and description alone.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources