Skip to main content
Glama

Get Device Logs

mobile_get_device_logs

Capture live Android logcat or iOS unified logs as JSON lines to debug app behavior. Filter by process, tag, or level; set a small limit or save large captures to a file.

Instructions

Collect live device logs (logcat on Android, unified log on iOS) as one JSON object per line. Only logs emitted after the call starts are captured, so trigger the behavior you want to observe right before or during the call. Stops after limit entries or after 30 seconds of silence. Each line of a stack trace counts as one entry, so filter by process or tag to avoid filling the limit with noise. Start with a small limit (20-50) for a quick look. For large captures, pass saveTo to write logs to a file and only the entry count is returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoStop after this many log entries
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
filterNoFilters, ANDed together. key=value includes, key!=value excludes. Keys: pid, process, tag, level, subsystem, category, message. Example: ["tag=ActivityManager", "level=Error", "process!=SpringBoard"]
saveToNoPath to write the logs to instead of returning them. Filename must end with .log, .txt, or .jsonl

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4.4/5.0
Behavior4/5

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

With only readOnlyHint=false and openWorldHint=true in annotations, the description carries the behavioral disclosure burden. It explains the capture window, 30-second silence stop, stack-trace line counting, and saveTo return behavior. This adds significant context beyond the annotations, though it does not explicitly discuss side effects of the optional file write beyond saying it writes to a file.

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?

The description is front-loaded with the core purpose and then layers important behavioral details and practical tips. Every sentence contributes useful information, with no fluff or redundancy.

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?

There is no output schema, so the description properly explains the return format (JSON object per line) and the saveTo behavior (only entry count). It also covers stopping conditions and filtering guidance. Minor missing details like timeout return behavior or what happens on empty results, but overall the description is complete enough for an agent to call the tool correctly.

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 each parameter is already described. The description adds meaningful usage semantics: filtering by process/tag to avoid noise, starting with a limit of 20-50, and the fact that saveTo changes the response to only an entry count. This clearly builds on the schema rather than repeating it.

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?

The description identifies a specific action and resource: collect live device logs (logcat on Android, unified log on iOS) as JSON lines. This clearly differentiates it from siblings like mobile_list_crashes and mobile_get_crash, which deal with crash reports rather than live logs.

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?

Provides strong usage context: logs are only captured after the call starts, so the agent should trigger the behavior before/during the call. It also advises starting with a small limit and using saveTo for large captures. It stops short of explicitly naming alternatives for when not to use this tool, but the guidance is practical and actionable.

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