Skip to main content
Glama

logcat

Dump recent Android log lines to diagnose native app crashes: filter by time, priority, tags, or a substring to find root causes like 'Caused by:' errors.

Instructions

Dump recent native log lines — the last N (default 400) or, with since="2m"/"90s", everything from that long ago on the device clock (the right axis when the report is 'I just hit an error'; on a chatty emulator 400 lines can span seconds). Optionally filtered by a case-insensitive substring, a minimum priority (V/D/I/W/E/F — e.g. priority="E" for errors and up), and/or tags (OR'd). This is how you find the REAL reason a native call failed when the UI only shows a generic 'X failed' alert: filter by your app tag or 'Exception'/'Caused by' and read the 'Caused by:' line — that is the root cause. Dumps and exits (does not stream); chatty spam is stripped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoKeep only lines whose log tag contains one of these (case-insensitive, OR'd), e.g. ["SessionStore","AuthModule"]. Omit for no tag filtering.
linesNoNumber of recent lines to dump. Default 400. Ignored when since is given.
sinceNoTime window instead of a line count: only lines from the last e.g. "2m", "90s", "1h30m" (device clock). The right axis when the report is "I just hit an error" — on a chatty emulator 400 lines can span under ten seconds.
filterNoCase-insensitive substring to keep (e.g. an app tag or "Exception").
redactNoMask common secrets (token, password, authorization, api key, secret) before returning log lines. Recommended for payment/auth SDKs and debug builds.
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
priorityNoMinimum priority to keep: V, D, I, W, E, or F (matches adb's own "*:E"-style filter — E keeps Error and Fatal). Omit for no priority filtering.
Behavior5/5

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

With no annotations provided, the description fully shoulders the transparency burden. It discloses: the tool dumps and exits (not streaming), strips chatty spam, is case-insensitive, accepts relative time windows via device clock, and the default of 400 lines can span only seconds on a chatty emulator. All behavioral traits are clearly communicated.

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?

The description is a single dense paragraph that wastes no words. Every clause earns its place: the default behavior, the since parameter explanation, the use-case hook, the filter/tag/priority options, the non-streaming nature, and the spam-stripping note. It is front-loaded with the core action and then layers detail. No fluff.

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?

Despite having 7 parameters and no annotations or output schema, the description covers all important aspects: what the tool does, how to use each parameter, when to use it, its behavioral limits (dump and exit, spam stripping, device clock for since), and how to interpret results ('Caused by: line is the root cause'). The only minor gap is that no output format is described, but for a text-dumping tool that's acceptable — the user sees raw logcat text.

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 baseline is 3. The description goes beyond the schema by explaining that since is 'the right axis when the report is I just hit an error' and that '400 lines can span seconds on a chatty emulator' — adding operational context not present in the parameter descriptions. It also clarifies that tags are OR'd and priority mirrors adb's *:E syntax, which is not in the schema. One small deduction: the description doesn't detail how multiple filters (tag, priority, filter) interact — but the schema already implies AND logic.

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 'Dump recent native log lines' — a strong verb+resource pair. It immediately distinguishes itself from sibling tools like start_logcat_capture (streaming), clear_logcat (clearing), and last_crash (crash-specific) by emphasizing its dump-and-exit, non-streaming behavior and its role for root-cause analysis.

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 explicitly tells when to use this tool: 'when the UI only shows a generic X failed alert.' It also indirectly advises against using it for streaming (since it dumps and exits) and positions it as complementary to start_logcat_capture/stop_logcat_capture for continuous monitoring. The since parameter is scoped to 'device clock' and the right axis is explained.

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/iksnerd/adb-mcp'

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