Skip to main content
Glama
zifanersuotang

Codex Android MCP

Android logs

android_logs
Read-onlyIdempotent

Inspect Android app runtime output via logcat, using snapshot or bounded live capture, filter by package, tag, or priority to diagnose crashes and errors.

Instructions

Read what an Android app prints while it runs, from logcat. Two bounded modes: snapshot reads the recent persisted ring (logcat -d -v time from a start timestamp computed on the DEVICE clock, default the last 2m); follow captures live output for duration_seconds (default 10, max 60) and returns everything accumulated when the window closes — never an unbounded stream. Narrow with bundle_id (limits the capture to that package’s running process via --pid), a tag, a minimum priority, a buffer (main/system/crash/events/radio/all), and a case-sensitive literal substring grep. Output is capped at ~300 lines / 30 KB (tail kept; truncated:true plus a narrowing hint when the cap bites) — an idle emulator emits hundreds of lines a second, so narrow before widening the window. To read a crash specifically, use buffer:"crash".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNologcat tag filter, e.g. "ActivityManager" — only lines from that tag are kept (combined with priority as `<tag>:<priority> *:S`). Safe ASCII only: start alphanumeric, then alphanumeric, underscore, dot, slash, or hyphen; whitespace, colon, and asterisk are rejected.
grepNoCase-sensitive literal substring applied exactly as supplied to each captured line after the window closes; regular-expression metacharacters have no special meaning.
modeNosnapshot: the recent persisted ring (default). follow: bounded live capture for duration_seconds, then return.
bufferNoLog buffer to read (default: logcat’s own main+system+crash). Use "crash" to read only fatal Java/native crashes, "events" for system events, "all" for everything.
deviceNoTarget adb serial. Defaults to the streamed device, else the only online one.
durationNoSnapshot window, e.g. "2m", "30s", "1h" (default "2m"). Ignored in follow mode.
priorityNoMinimum priority: V(erbose) D(ebug) I(nfo) W(arn) E(rror) F(atal). Default keeps everything the buffer holds.
bundle_idNoAndroid package name whose process the capture is limited to, e.g. "com.example.app". Resolved to a pid with `pidof -s` and passed as --pid, so the app must be RUNNING; requires at least two ASCII dot-separated identifiers, each starting with a letter and continuing with letters, digits, or underscore. When it is not running, the tool says so and suggests grep instead of returning nothing.
duration_secondsNoFollow capture window in seconds, 1..60 (default 10; larger values are clamped). Ignored in snapshot mode.
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint false, and the description adds substantial behavior beyond them: output is capped at ~300 lines/30 KB with a truncated:true flag plus a narrowing hint, the snapshot start timestamp is computed on the DEVICE clock (default last 2m), follow mode closes after duration_seconds and returns everything accumulated, and bundle_id requires a RUNNING process resolved via pidof. This is exceptionally transparent for an agent to reason about tool side effects and resource use.

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 long but every sentence carries a distinct behavioral fact — no filler, no repetition of the schema. It is front-loaded with purpose, then mode semantics, then narrowing, then output caps. Slightly dense, but each clause earns its place and nothing is repeated from the input-schema documentation.

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?

For a 9-parameter, 3-enum, bound-mode tool with no output schema, the description covers the essential contract: boundedness in both modes, return caps and truncation signal, clock semantics, buffer selection for crash/events, and the running-process prerequisite for bundle_id. Minor omissions exist (e.g., the exact full return shape beyond truncated:true), but nothing an agent needs to call it correctly 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 coverage is 100%, so baseline is 3, but the description adds genuine behavior beyond the schema: it explains the ring-buffer persistence, default window semantics, the follow-window closing behavior, the --pid resolution mechanism behind bundle_id, and the truncation/narrowing response. These details are not in the schema and materially change how an agent would set parameters.

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 opens with a specific verb+resource: 'Read what an Android app prints while it runs, from logcat.' It also nails the scope precisely (bounded, never unbounded), and none of the 18 sibling tools are log readers, so it is unambiguous which tool an agent should pick for log inspection.

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 clear mode-selection guidance (snapshot vs follow) with defaults and bounds, and explicitly routes crash reading to buffer:'crash'. It also advises narrowing before widening because an idle emulator emits hundreds of lines a second, and documents the fallback behavior when a bundle_id targets a non-running app ('suggests grep'). It doesn't name sibling alternatives, but no sibling competes for this job, so exclusions are unnecessary.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zifanersuotang/codex-android-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server