get_app_logs
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
| Name | Required | Description | Default |
|---|---|---|---|
| grep | No | Case-insensitive regex; only matching lines are returned (e.g. a category like "\[network\]") | |
| clear | No | Clear the buffer after reading | |
| lines | No | Last N matching lines (default 200) | |
| device | No | Device UDID or name substring. Defaults to the select_device choice, then IOS_DEVICE_MCP_DEVICE, else the single USB-connected device. | |
| bundleId | Yes | App bundle ID, e.g. com.example.MyApp (see list_apps) |