{"at":"2026-11-23T01:48:53.840Z","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-23T01:48:54.282Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T01:48:54.383Z","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-23T01:48:54.794Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"android-viewer","version":"1.0.2"}}}}
{"at":"2026-11-23T01:48:54.794Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T01:48:54.794Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T01:48:54.798Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"readOnlyHint":true},"description":"Lists the AVDs on this machine (with serial and booted when the emulator is running) and the adb devices that are not AVDs. An AVD with serial null is stopped: start it with launch_avd.","execution":{"taskSupport":"forbidden"},"inputSchema":{"properties":{},"type":"object"},"name":"list_devices","title":"List devices"},{"annotations":{"readOnlyHint":true},"description":"Size and rotation of the active display, current posture and available postures (foldables). Includes the viewer URL to watch the device in a browser pane.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"adb serial (e.g. emulator-5556). Optional when only one device is connected.","type":"string"}},"type":"object"},"name":"get_state","title":"Device state"},{"annotations":{"readOnlyHint":true},"description":"Captures the active display (PNG). For tap/swipe use normalized coordinates: x = pixel_x / image width, y = pixel_y / image height.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"adb serial (e.g. emulator-5556). Optional when only one device is connected.","type":"string"}},"type":"object"},"name":"screenshot","title":"Screenshot"},{"description":"Taps a point on the screen (input tap).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"adb serial (e.g. emulator-5556). Optional when only one device is connected.","type":"string"},"x":{"description":"x coordinate, normalized 0–1 over the screenshot","maximum":1,"minimum":0,"type":"number"},"y":{"description":"y coordinate, normalized 0–1 over the screenshot","maximum":1,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"name":"tap","title":"Tap"},{"description":"Swipes from one point to another (input swipe). With the same start and end point and a duration ≥ 500 ms it is a long press.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"duration_ms":{"default":300,"description":"Gesture duration in ms","maximum":5000,"minimum":50,"type":"integer"},"serial":{"description":"adb serial (e.g. emulator-5556). Optional when only one device is connected.","type":"string"},"x1":{"description":"Start x, normalized 0–1 over the screenshot","maximum":1,"minimum":0,"type":"number"},"x2":{"description":"End x, normalized 0–1 over the screenshot","maximum":1,"minimum":0,"type":"number"},"y1":{"description":"Start y, normalized 0–1 over the screenshot","maximum":1,"minimum":0,"type":"number"},"y2":{"description":"End y, normalized 0–1 over the screenshot","maximum":1,"minimum":0,"type":"number"}},"required":["x1","y1","x2","y2"],"type":"object"},"name":"swipe","title":"Swipe"},{"description":"Presses a system key (input keyevent).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"key":{"description":"Key","enum":["back","home","recents","power","wakeup","volup","voldown","enter","delete","tab","escape"],"type":"string"},"serial":{"description":"adb serial (e.g. emulator-5556). Optional when only one device is connected.","type":"string"}},"required":["key"],"type":"object"},"name":"press_key","title":"Press key"},{"description":"Types ASCII text into the focused field (input text). For Enter use press_key.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"adb serial (e.g. emulator-5556). Optional when only one device is connected.","type":"string"},"text":{"description":"Text to type","maxLength":1000,"minLength":1,"type":"string"}},"required":["text"],"type":"object"},"name":"type_text","title":"Type text"},{"description":"Starts an emulator by AVD name (see list_devices). Returns right away: wait until list_devices shows it with booted=true before using it.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"avd":{"description":"AVD name, e.g. Pixel_10_Pro_Fold","type":"string"}},"required":["avd"],"type":"object"},"name":"launch_avd","title":"Launch AVD"},{"description":"Rotates the emulator 90° (like the emulator's rotate button). Emulators only.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"direction":{"description":"Direction","enum":["left","right"],"type":"string"},"serial":{"description":"adb serial (e.g. emulator-5556). Optional when only one device is connected.","type":"string"}},"required":["direction"],"type":"object"},"name":"rotate","title":"Rotate"},{"description":"Changes the posture of a foldable. On emulators it moves the simulated hinge (`emu posture`); on physical devices or for REAR_DISPLAY it uses `cmd device_state state`. Accepts the name (closed, half_opened, opened, rear_display), the numeric id or \"reset\" to go back to the sensor posture. Returns the new state.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"posture":{"anyOf":[{"type":"string"},{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}],"description":"Name, id or \"reset\""},"serial":{"description":"adb serial (e.g. emulator-5556). Optional when only one device is connected.","type":"string"}},"required":["posture"],"type":"object"},"name":"set_posture","title":"Set posture"}]}}}
