{"at":"2026-11-23T05:57:26.355Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:57:26.734Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T05:57:26.834Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T05:57:27.200Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"instructions":"karagoz drives Android emulators and phones, and iOS simulators and iPhones on macOS. To see the screen, call ui_tree first: node bounds are the pixels tap and swipe take; take a screenshot only when you need the image. Pass device only when more than one device is connected. Each result is one JSON object; on failure, branch on error.code. If adb or Xcode is missing, old or broken, call doctor.","protocolVersion":"2025-11-25","serverInfo":{"name":"karagoz","version":"0.4.0"}}}}
{"at":"2026-11-23T05:57:27.200Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T05:57:27.200Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T05:57:27.202Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List Android devices and emulators, running iOS simulators, and iPhones connected to this Mac.","inputSchema":{"properties":{},"type":"object"},"name":"devices","title":"List devices"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Save a full-resolution PNG of the screen and return its path with size, scale and safe area. Use ui_tree to read the screen; inline only to look at the image.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"inline":{"description":"Also return the image. Take coordinates from ui_tree, not from the image.","type":"boolean"},"out":{"description":"Absolute PNG path, ending in .png. Default: a new temp file.","type":"string"}},"type":"object"},"name":"screenshot","title":"Take a screenshot"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Return the focused window's accessibility tree as JSON, compact by default: nodes with no text, label or action and nodes off screen are left out. Node bounds [left, top, right, bottom] are the physical pixels tap and swipe take. On an iPhone it needs karagoz's runner: install it once with install_runner.","inputSchema":{"properties":{"detail":{"description":"full: every node.","enum":["compact","full"],"type":"string"},"device":{"description":"Id or name.","type":"string"}},"type":"object"},"name":"ui_tree","title":"Read the UI tree"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Tap x, y in physical pixels, or the center of the node whose text or contentDesc (iOS: label or value) equals text, or whose resource id (iOS: identifier) matches id. An iPhone needs install_runner once.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"id":{"description":"Resource id, full or the part after :id/ (iOS: identifier).","type":"string"},"text":{"description":"Exact text or contentDesc (iOS: label or value), case-sensitive.","type":"string"},"timeout":{"description":"With text or id: ms to keep reading the tree until the node appears; the call can run up to 6 s longer.","type":"integer"},"x":{"type":"number"},"y":{"type":"number"}},"type":"object"},"name":"tap","title":"Tap"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Long-press x, y in physical pixels, or the center of the node whose text or contentDesc (iOS: label or value) equals text, or whose resource id (iOS: identifier) matches id. An iPhone needs install_runner once.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"duration":{"description":"Hold time in ms. Default 1000.","type":"integer"},"id":{"description":"Resource id, full or the part after :id/ (iOS: identifier).","type":"string"},"text":{"description":"Exact text or contentDesc (iOS: label or value), case-sensitive.","type":"string"},"timeout":{"description":"With text or id: ms to keep reading the tree until the node appears; the call can run up to 6 s longer.","type":"integer"},"x":{"type":"number"},"y":{"type":"number"}},"type":"object"},"name":"long_press","title":"Long-press"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Double-tap x, y in physical pixels, or the center of the node whose text or contentDesc (iOS: label or value) equals text, or whose resource id (iOS: identifier) matches id. An iPhone needs install_runner once.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"id":{"description":"Resource id, full or the part after :id/ (iOS: identifier).","type":"string"},"text":{"description":"Exact text or contentDesc (iOS: label or value), case-sensitive.","type":"string"},"timeout":{"description":"With text or id: ms to keep reading the tree until the node appears; the call can run up to 6 s longer.","type":"integer"},"x":{"type":"number"},"y":{"type":"number"}},"type":"object"},"name":"double_tap","title":"Double-tap"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Swipe from x1, y1 to x2, y2 in physical pixels. An iPhone needs install_runner once.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"duration":{"description":"ms from start to end. Default 300.","type":"integer"},"x1":{"type":"number"},"x2":{"type":"number"},"y1":{"type":"number"},"y2":{"type":"number"}},"required":["x1","y1","x2","y2"],"type":"object"},"name":"swipe","title":"Swipe"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Type into the focused field. Any text; on Android, text beyond ASCII is pasted through the clipboard and the old clip put back. An iPhone needs install_runner once.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"text":{"type":"string"}},"required":["text"],"type":"object"},"name":"text","title":"Type text"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Press one key.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"key":{"description":"KeyEvent name (HOME, BACK, KEYCODE_7) or code 1-340; \"7\" is code 7 (KEYCODE_0), not the digit. iOS takes HOME, POWER, VOLUME_UP/DOWN and keyboard keys; an iPhone only keys that type a character, and needs install_runner once.","type":"string"}},"required":["key"],"type":"object"},"name":"key","title":"Press a key"},{"annotations":{"destructiveHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Install an .apk, or a .app or .ipa on an iOS simulator or iPhone, or replace the installed version of the same app. An iPhone takes only a build signed for it; karagoz does not re-sign. Times out after 30 s plus 1 s per MB.","inputSchema":{"properties":{"apk":{"description":"Absolute path to the .apk, .app or .ipa.","type":"string"},"device":{"description":"Id or name.","type":"string"}},"required":["apk"],"type":"object"},"name":"install","title":"Install an app"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Start an app as its launcher icon does. On iOS it returns before the app is in front.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"package":{"type":"string"}},"required":["package"],"type":"object"},"name":"launch","title":"Launch an app"},{"annotations":{"destructiveHint":false,"openWorldHint":true,"readOnlyHint":false},"description":"Open a URL in the app that handles it, or in the app named by app. On iOS it returns before the app is in front, and a simulator may first ask \"Open in <app>?\".","inputSchema":{"properties":{"app":{"description":"Package name or bundle id; not on an iOS simulator.","type":"string"},"device":{"description":"Id or name.","type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"},"name":"open_url","title":"Open a URL"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Force-stop every process of an app.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"package":{"type":"string"}},"required":["package"],"type":"object"},"name":"terminate","title":"Stop an app"},{"annotations":{"destructiveHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Remove an app.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"package":{"type":"string"}},"required":["package"],"type":"object"},"name":"uninstall","title":"Uninstall an app"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Read the newest device log records, oldest first. On iOS without since: the last minute, or the last hour with package. An iPhone read takes about 10 s.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"lines":{"description":"Number of newest records. Default 30.","type":"integer"},"package":{"description":"Only this app's records.","type":"string"},"since":{"description":"Unix seconds on the device clock; only later records. Pass a record's time to continue.","type":"number"}},"type":"object"},"name":"logs","title":"Read device logs"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Report which adb and Xcode tools karagoz uses, their versions, and how to fix one that is missing, old or broken.","inputSchema":{"properties":{},"type":"object"},"name":"doctor","title":"Check adb and Xcode"},{"annotations":{"destructiveHint":false,"openWorldHint":true,"readOnlyHint":false},"description":"Build karagoz's runner with your Apple team and install it on a paired iPhone over USB; ui_tree, tap, swipe, text and key need it there.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"},"team":{"description":"Apple team ID; needed only when Xcode lists several.","type":"string"}},"type":"object"},"name":"install_runner","title":"Install karagoz's iPhone runner"},{"annotations":{"destructiveHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Remove karagoz's runner and its provisioning profile from an iPhone.","inputSchema":{"properties":{"device":{"description":"Id or name.","type":"string"}},"type":"object"},"name":"uninstall_runner","title":"Remove karagoz's iPhone runner"}]}}}
