Skip to main content
Glama

Robot Actions — Remote Device Control

Webpage CDP command

webpage_cdp_command
Destructive

Send a raw DevTools-protocol command to the browser page on a device and return its reply — the escape hatch for capabilities no dedicated tool wraps yet (Emulation, Performance, CSS, Animation, DOM mutation, …). Works on BOTH iOS Safari and Android Chrome, auto-detected from the udid. method is "Domain.command" (e.g. "Emulation.setGeolocationOverride"); params is that command's parameter object. Scope is the BROWSER — this reaches web content only, never the device or native apps. Prefer a dedicated tool when one exists: they handle setup ordering, lifecycle and teardown that a bare command does not. IMPORTANT, iOS: the two engines do NOT implement the same protocol — Android is full CDP, iOS is WebKit's dialect. Chrome-only domains fail with -32601 "domain was not found" (Accessibility, Emulation, and Page.captureScreenshot are all absent on iOS), and a *.enable on iOS reports success without proving the domain exists, so never treat it as a capability probe — probe with a real method.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesDevice UDID / serial (iOS or Android)
methodYesProtocol method as "Domain.command", e.g. "Emulation.setDeviceMetricsOverride"
pageIdNoTarget page/tab id — auto-picked when omitted
paramsNoThe command's parameter object; omit for commands that take none
socketNoAndroid only: abstract unix socket name (default: chrome_devtools_remote)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare destructive/openWorld/non-idempotent but say nothing about dialect or failure modes. The description adds high-value behavior: iOS uses WebKit's dialect, Chrome-only domains fail with -32601, and a `*.enable` on iOS reports success without proving the domain exists, so it must not be used as a capability probe. That is exactly the kind of operational context annotations cannot carry.

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?

Front-loaded with purpose, then routing guidance, then the platform-specific pitfalls. The density is high and every sentence carries an actionable constraint (scope, precedence, error code, probe warning); nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter, open-world, destructive escape hatch with no output schema, the description covers what the return is ('its reply'), which platforms it spans, the auto-detection behavior, and the failure modes. Nothing an agent needs to invoke it safely is missing.

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 baseline is 3; the description goes further by spelling out that `method` is 'Domain.command' with a concrete example and that `params` is that command's parameter object (omit when none), plus the caveat that method names differ across the two engines. It adds meaning about parameter validity beyond the schema, though it does not document pageId or socket.

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?

States a specific verb+resource ('Send a raw DevTools-protocol command to the browser page on a device and return its reply') and immediately positions itself as the escape hatch for capabilities no dedicated tool wraps. An agent can distinguish it from siblings like android_devtools_evaluate or ios_safari_evaluate without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing: use this only for capabilities no dedicated tool wraps, and 'Prefer a dedicated tool when one exists' because dedicated tools handle setup ordering, lifecycle and teardown. It also states the boundary of applicability (BROWSER scope only, never device or native apps) and the iOS-vs-Android protocol difference, which are the conditions that decide whether calling it will work at all.

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