Skip to main content
Glama

Read logcat (condensed)

logcat

Condense Android device logs for one app, collapse repeated entries, shorten stack traces, and surface crash/ANR root causes with app frames; optionally retrace R8 mapping.

Instructions

Condensed device log: filtered to one app (by PID), repeats collapsed (xN), stacks shortened, crashes/ANRs first with root cause and app frames. Optional mappingFile retraces R8.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "logcat"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoOnly this tag
tagsNoOnly these tags
linesNoMax lines shown (default 80)
serialNoDevice serial; optional if one device
sinceMsNoOnly entries from the last N ms
maxLinesNoAlias of lines
minLevelNoDefault I
appPackageNoApplication id; strongly recommended
clearAfterNoClear buffer after reading
mappingFileNoR8 mapping.txt

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.8/5.0
Behavior4/5

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

The annotations only cover safety hints (readOnlyHint=false, destructiveHint=false), so the description carries the real disclosure burden and does well: it explains the output pipeline — PID filtering, xN repeat collapsing, shortened stacks, crash/ANR prioritization with root cause and app frames, and mappingFile-based R8 retracing. What it omits is the effect of clearAfter, which mutates the device buffer; that behavior is neither explained here nor implied by the annotations, which is the main gap.

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?

Two dense sentences, front-loaded with the resource and the most decision-relevant characteristic (condensed, app-filtered), then the transformation details. No filler, no restatement of the tool name or annotation content.

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?

With ten optional parameters and no output schema, the description does the important work of describing the returned shape (ordering, collapsing, stack shortening), which is exactly what an agent needs since no output schema exists. It falls short on the buffer-clearing side effect of clearAfter and on device-selection expectations, but for a read-style log tool it is nearly complete.

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 description coverage is 100%, so the schema already documents all ten parameters including defaults (lines=80, minLevel=I). The description adds only marginal semantics beyond that — it clarifies that filtering is by PID and that mappingFile performs R8 retracing — which is useful but does not meaningfully extend what the schema says. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource and, more usefully, the exact form of the output: a condensed device log filtered to one app by PID, with repeats collapsed and crashes/ANRs hoisted to the top. An agent immediately knows this is not a raw log dump. It does not explicitly contrast itself with the sibling logcat_clear, but the 'read/condensed' framing is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the phrase 'filtered to one app (by PID)' hints that an app scoping parameter should be supplied, and the crash-first ordering suggests it is the tool for diagnosing crashes. There is no explicit when-to-use, when-not-to-use, or named alternative (e.g. logcat_clear for buffer management), so the agent must infer selection.

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