Skip to main content
Glama

Read logcat

adb_logcat
Read-onlyIdempotent

Read recent Android logcat lines without waiting for new entries to diagnose app crashes or filter by tag or substring when shell access is disabled.

Instructions

Read recent logcat lines without waiting for new ones, e.g. to see why an app crashed; unlike adb_shell it works with allow_shell off. filter: either a logcat filterspec like "ActivityManager:I :S" (contains ":" or ""; *:S is auto-appended if missing so unmatched tags are silenced) or a plain substring grepped case-insensitively across the whole line. lines limits the result (default 200). Filtering runs on the device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNoHow many lines to return, default 200, at most 2000.
filterNoA filterspec such as "ActivityManager:I *:S" (has ":" or "*"), or a plain substring matched case-insensitively. Omit for the last lines unfiltered.
serialNoDevice serial from adb_devices. Optional when exactly one device is connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safety profile is covered. The description goes further by disclosing that it does not wait for new lines, that filtering runs on the device, and that *:S is auto-appended to silence unmatched tags — genuinely useful behavioral context. It stops short of describing return/pagination behavior, so not a 5.

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?

Front-loaded with the purpose before elaborating on filtering, and nearly every clause adds information (wait behavior, shell-off compatibility, filterspec rules, on-device filtering). It is dense and slightly run-on with stacked parentheticals, but there is no filler.

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 zero-required-parameter, read-only tool with a fully described schema, rich annotations, and no output schema, the description supplies everything needed: purpose, alternative routing, and filter semantics. No output-format explanation is owed since no output schema exists.

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 the baseline is 3. The description earns above-baseline credit by explaining the dual semantics of filter (filterspec when it contains ':' or '*', otherwise case-insensitive whole-line substring) and the auto-append rationale that the schema alone does not fully motivate.

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?

Specific verb+resource ("Read recent logcat lines") with an explicit scope qualifier ("without waiting for new ones"). It actively distinguishes itself from the sibling adb_shell ("unlike adb_shell it works with allow_shell off"), so an agent can route correctly without opening a schema.

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 a concrete use case ("e.g. to see why an app crashed") and names the alternative (adb_shell) with the condition that selects this tool (works when allow_shell is off). Clear context, but no explicit statement of when this tool should NOT be used in favor of a sibling beyond the single adb_shell comparison.

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