Skip to main content
Glama

get_app_logs

Destructive

Reads buffered console logs from an app launched with captureLogs=true, supporting regex filtering, line limits, and buffer clearing so you can debug output from a USB-connected iPhone or iPad.

Instructions

Read console output captured from an app started with launch_app captureLogs=true, oldest line first; it fails if no capture was started. Can't read logs from an app launched any other way. os_log/Logger lines look like <timestamp> App[pid:tid] [category] message. The buffer holds the last 5000 lines and stays readable after the app exits, which the result notes. clear discards every buffered line, including those grep left out.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "bundleId": "<bundleId>"
    },
    "name": "get_app_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
grepNoCase-insensitive regex; only matching lines are returned (e.g. a category like "\[network\]")
clearNoClear the buffer after reading
linesNoLast N matching lines (default 200)
deviceNoDevice UDID or name substring. Defaults to the select_device choice, then IOS_DEVICE_MCP_DEVICE, else the single USB-connected device.
bundleIdYesApp bundle ID, e.g. com.example.MyApp (see list_apps)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.2
    • addedInput schema / properties / bundleId / description
      Added value: +"App bundle ID, e.g. com.example.MyApp (see list_apps)"
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

The annotations already declare destructiveHint=true, but the description adds real behavior: oldest-first ordering, the 5000-line buffer cap, survival after app exit (noted in the result), the os_log/Logger line format, and the fact that clear discards every buffered line including lines grep excluded. That last point explains why a read tool is destructive—context a schema or annotation cannot convey.

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 purpose and precondition, dense and largely free of waste. The os_log format sentence is an aside that could be trimmed, and the final sentence packs clear+buffer into a semicolon chain, but nothing is redundant.

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?

No output schema exists, yet the description still tells the agent the result notes post-exit readability, and it covers the failure mode, buffer limits, and line format. For a 5-parameter read tool with a destructive clear flag, an agent has everything needed to call it 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?

With 100% schema coverage the baseline is 3, but the description adds meaning beyond the schema: it clarifies clear's scope ('discards every buffered line, including those grep left out') and the ordering semantics that lines/grep operate under. Device and bundleId are left to the schema, but the trickiest parameter interaction is covered.

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: reading the console output an app captured. It immediately distinguishes itself from other ways of getting logs by saying the app must have been started with launch_app captureLogs=true, so an agent can tell it apart from general app-inspection siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives an explicit precondition ('started with launch_app captureLogs=true') and an explicit failure case ('it fails if no capture was started'; 'Can't read logs from an app launched any other way'). This routes the agent to launch_app with captureLogs=true instead of calling this tool blindly, with no inference required.

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