Skip to main content
Glama

Robot Actions — Remote Device Control

Android DevTools console logs

android_devtools_console_logs
Read-onlyIdempotent

Collect console logs, exceptions, and log entries from a page running on the device for a time window. Enables Runtime and Log domains, then listens for Runtime.consoleAPICalled, Runtime.exceptionThrown, and Log.entryAdded events. Returns a normalized array of { level, text, url?, lineNumber? } entries. This is a LIVE-WINDOW collector: it only captures events fired AFTER it attaches, so triggering the logging from a SEPARATE tool call races the ~1-3s attach latency and is silently missed. To capture logs from an action, pass triggerJs (runs inside the window). Default window: 3 000 ms. Maximum: 15 000 ms. 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)
triggerJsNoJavaScript run INSIDE the collection window (right after the listeners attach) so the logs it produces are captured race-free — e.g. "location.reload()", "document.querySelector('#go').click()", or "console.log('probe')". Prefer this over triggering from a separate call.
durationMsNoCollection window in milliseconds (default: 3000, max: 15000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes well beyond them: it discloses that it enables Runtime and Log domains, subscribes to specific events, returns a normalized entry array, and — critically — that it only captures events fired AFTER attach. That live-window caveat is essential behavioral context an agent cannot infer.

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-loads purpose, then mechanism, then return shape, then the crucial race caveat and defaults. Sentences are dense but each one carries non-redundant information (event names, latency window, defaults, auto-select).

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?

With no output schema, the description compensates by specifying the exact return shape ({ level, text, url?, lineNumber? }). Combined with the attach-window semantics and parameter defaults, an agent has everything needed to call it correctly.

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 coverage is 100%, and the schema already documents the default (3000ms), max (15000ms), triggerJs race-free rationale, and pageId auto-pick. The description largely restates this, so the baseline of 3 applies; it adds no syntax or format detail absent from the schema.

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 and resource ('Collect console logs, exceptions, and log entries from a page running on the device') and scopes it to a time window. It is clearly distinguishable from siblings like android_devtools_capture_network and web_console_messages, and even lists the exact CDP events it listens to.

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

Usage Guidelines4/5

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

Gives strong conditional guidance: it warns that triggering logging from a separate tool call races the ~1-3s attach latency and is silently missed, and directs the agent to use triggerJs instead. It does not name an alternative sibling tool for the non-live case, so it falls short of a full 5.

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