Skip to main content
Glama

Robot Actions — Remote Device Control

Android DevTools get DOM

android_devtools_get_dom
Read-onlyIdempotent

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

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context the annotations don't carry: the 100,000-character output cap and the appended truncation notice, which directly affects how an agent should handle the result.

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?

Three short sentences, front-loaded with the core action, then the output-size constraint, then the parameter default. No filler or restatement of the title.

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?

No output schema exists, so the description must carry the return contract, and it does: outerHTML of the page or matched element, with the size cap and truncation behavior disclosed. Annotations cover safety. The only gap is the lack of routing guidance against sibling DOM/page-source tools.

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 coverage is 100%, so baseline is 3. The description goes slightly beyond the schema by spelling out what 'auto-picked' means for pageId — the visible/active page — which the schema only labels 'auto-picked when omitted.' Selector semantics are already in the schema, so the added value is modest.

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?

States a specific verb and resource: 'Get the outer HTML of the page (or a CSS-selector-matched element) running on the device via CDP.' An agent knows exactly what it returns, but the description never distinguishes it from close siblings like android_devtools_elements or device_page_source, which also expose page structure.

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 only guidance is 'Omit pageId to auto-select the visible/active page,' which explains a parameter default rather than when to pick this tool over android_devtools_elements or device_page_source. Usage context is implied by the CDP/outerHTML framing but no alternatives or exclusions are named.

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