Skip to main content
Glama

get_device_logs

Retrieve OS-level native device logs—Android logcat and iOS simulator log show—to diagnose crashes, ANRs, system events, and SDK output, with filters for tag, level, search, and line count.

Instructions

Get OS-level device logs. Android: logcat. iOS: log show (simulators only). Captures native logs (crashes, ANRs, system events, SDK logs) — different from JavaScript console logs.

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": "get_device_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoFilter by log tag (Android: -s tag, iOS: subsystem). Example: "ReactNativeJS", "ActivityManager"
clearNoClear the log buffer before reading (Android only). Useful to capture only new logs from this point forward. Default: false
levelNoMinimum log level. Default: info
linesNoNumber of log lines to return. Default: 50
searchNoFilter log lines containing this string (case-insensitive)
platformNoTarget platform. Inferred if omitted.
device_idNoDevice ID. Omit for the connected device.
dump_to_fileNoAndroid only. Write the entire log buffer to a local file and return its path plus a summary, instead of returning log lines. Use when the windowed read is not enough. Default: false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does reasonably well: it names the underlying collectors, enumerates the log categories captured (crashes, ANRs, system events, SDK logs), and warns that iOS capture is simulator-limited. It does not mention permission or entitlement requirements, nor the fact that reading the full buffer can be slow/heavy, which is the main operational risk here.

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 short sentences with zero filler: the core purpose is front-loaded, platform mechanics follow, and the disambiguation lands last. Every clause carries information an agent would otherwise have to infer.

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 an eight-parameter, all-optional read tool with no output schema and no annotations, the description covers purpose, platform mechanics, source categories, and the key platform limitation. The remaining gap is return-value shape (windowed lines vs. the dump_to_file path-plus-summary mode) — the latter is described only in the schema, and the description never mentions that two different result forms exist.

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 every one of the eight parameters (tag, clear, level, lines, search, platform, device_id, dump_to_file) is already fully documented in the schema, including defaults, bounds, and platform applicability. The description adds only contextual framing ('native logs') that indirectly informs tag choice. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Get OS-level device logs') and then pins down the concrete mechanism per platform (logcat / log show). It also pre-empts the most likely confusion by naming what it is NOT: 'different from JavaScript console logs.' An agent can distinguish this from console-log style retrieval without opening the 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?

The description gives a clear selection rule (native/OS logs rather than JS console logs) and discloses a hard constraint up front: iOS support is 'simulators only.' It does not name a specific alternative tool or state exclusions beyond that, so it falls short of a full when/when-not routing paragraph.

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