Skip to main content
Glama

Robot Actions — Remote Device Control

android_devtools_console_logs

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.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers richly: it discloses that the tool enables Runtime and Log domains, listens for three specific events, returns a normalized array, is a live-window collector that only captures post-attach events, has a ~1-3s attach latency race condition, and supports pageId auto-selection. This is exemplary behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense (~130 words) but every element is load-bearing: the live-window warning and triggerJs guidance are critical for correct use. It is front-loaded with the core purpose. Minor redundancy exists between the main race warning and the triggerJs parameter description, so it is not maximally tight, but it is well-structured.

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 tool with 100% schema coverage and no output schema, the description is complete: it documents the return shape ({ level, text, url?, lineNumber? }), the live-window semantics, defaults, maximum, and page auto-selection. There is no output schema and no annotations, yet the description covers everything an agent needs to call it correctly.

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 adds value beyond the schema by explaining that triggerJs runs INSIDE the collection window and is race-free, gives concrete examples ('location.reload()', 'console.log('probe')'), and cross-references the default/max window values that the schema also encodes. This meaningfully enriches parameter understanding, warranting a 4.

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 states a specific verb and resource: 'Collect console logs, exceptions, and log entries from a page running on the device for a time window.' It further distinguishes itself by naming the exact CDP domains and events (Runtime.consoleAPICalled, Runtime.exceptionThrown, Log.entryAdded) and the normalized return shape, which clearly separates it from siblings like android_devtools_capture_network, session_console_logs, and web_console_messages.

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?

The description gives explicit when-not guidance: triggering logging from a SEPARATE tool call 'races the ~1-3s attach latency and is silently missed,' and provides the corrective alternative: 'pass triggerJs (runs inside the window).' It also states the default (3000 ms), maximum (15000 ms), and page auto-selection behavior, leaving no ambiguity about how to invoke it correctly.

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