Skip to main content
Glama

Read Adb Logcat

read_adb_logcat
Idempotent

Read a bounded dump of Android device logcat for a selected buffer, optionally filtered by process ID, returning only the newest lines for recent log inspection.

Instructions

Read a bounded dump of the device log (logcat -d -t) for one buffer, optionally restricted to a process id. No streaming, no clearing; the newest lines are kept when the count cap trims. Read-only.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "count": 200,
      "buffer": "main",
      "serial": "emulator-5554"
    },
    "name": "read_adb_logcat"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNoRestrict to one process id (logcat --pid)
countNoNumber of most recent lines to read (logcat -d -t)
bufferNoLog buffer to read (logcat -b)
serialYesDevice serial exactly as `adb devices` reports it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior1/5

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

The description explicitly declares 'Read-only', while annotations set readOnlyHint=false, a direct conflict on the very property that governs whether an agent treats this as a safe non-mutating call. Per the contradiction rule this scores 1. Absent that conflict the disclosure would be strong — it names the exact command shape, that nothing is streamed or cleared, and that the newest lines survive the count cap.

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 compact sentences with the core operation front-loaded and the two key exclusions (no streaming, no clearing) plus trimming behavior packed into the second. No filler and nothing repeated from the schema or annotations.

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 four-parameter read tool with no output schema, the description conveys what comes back (bounded lines from one buffer) and how trimming works, which is the main ambiguity. It leaves the response envelope (format, truncation markers) unstated, but that is a minor gap for a log-dump tool.

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 the parameters are already documented; the description still adds meaning by clarifying that the count cap keeps the newest lines (trimming direction) and that filtering is by process id against a single buffer. It does not cover the buffer enum values or serial format, which the schema already handles.

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 verb and resource with precise scope: a bounded dump of the device log via `logcat -d -t`, one buffer, optionally filtered by pid. An agent can tell this is a one-shot log read rather than a stream or a state change. It does not name a sibling (e.g., a bugreport or capture tool) to disambiguate the closest alternatives, so it stops short of a 5.

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?

'No streaming, no clearing' implies which jobs this tool is not for, but no alternative is named for those cases and no precondition (device connected, adb available, pid viability) is stated. Usage is implied by the scope rather than spelled out.

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

Deploy Server

Other Tools