Skip to main content
Glama

Read a logcat snapshot

logcat_snapshot
Read-onlyIdempotent

Dump the current Android logcat buffer from one device, optionally filtered by log tag. Returns bounded output; use stream tools for continuous logs.

Instructions

Dump the current logcat buffer (adb logcat -d) from one device, optionally filtered to a log tag. Bounded output; use the stream tools when you need to watch logs over time.

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial from list_devices; optional when exactly one device is connected.
max_linesNoMaximum lines to return, most recent kept (default 200, max 5000).
timeout_msNoTimeout in milliseconds (default 30000).
filter_specNologcat filter spec, e.g. "AndroidRuntime:E *:S" or "ActivityManager:I *:S". Space separated, passed to adb logcat as-is.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint, so safety is covered. The description adds real behavioral context beyond that: it captures a bounded snapshot (not a follow), is scoped to one device, and the output is bounded — the key trait separating it from the stream tools.

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 sentences, zero waste: behavior and scope first, then the routing constraint. Everything is front-loaded and every clause earns its place.

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 read-only snapshot tool with 100% schema coverage and full annotations and no output schema, the description covers the essential decision (snapshot vs stream) and the bounded nature of output. It need not enumerate return format, though a note on truncation behavior would close the remaining gap.

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 all four parameters (device, max_lines, timeout_ms, filter_spec) are already documented in the schema; baseline 3 applies. The description's phrase 'optionally filtered to a log tag' is slightly narrower than the schema's full logcat filter spec, adding little and potentially under-selling filter_spec.

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?

States a specific verb and resource ('Dump the current logcat buffer') plus the underlying command and scope ('from one device'), and explicitly sets itself apart from the streaming siblings. An agent can tell it apart from start_logcat_stream/read_logcat_stream without opening any 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?

'use the stream tools when you need to watch logs over time' gives a clear selection condition and points to the alternative family. It stops short of naming the exact sibling (start_logcat_stream vs read_logcat_stream) or stating the reverse condition, so it is clear but not fully explicit.

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