{"at":"2026-11-23T00:47:57.048Z","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-23T00:47:57.440Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T00:47:57.541Z","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-23T00:47:57.938Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"scrcpy-mcp","version":"0.0.0"}}}}
{"at":"2026-11-23T00:47:57.938Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T00:47:57.938Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T00:47:57.945Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Start scrcpy Session"},"description":"Start a scrcpy session for fast input control and screenshots. When a session is active, tap/swipe/text/screenshot are 10-50x faster. Requires scrcpy-server to be installed.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"maxFps":{"default":30,"description":"Max frames per second (default 30)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"maxSize":{"default":1024,"description":"Max screen dimension in pixels (default 1024)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"start_session","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable status message","type":"string"},"screenSize":{"additionalProperties":false,"description":"Native display resolution — tap/swipe use these native coordinates, matching ui_dump / ui_find_element bounds directly (no scaling)","properties":{"height":{"description":"Native display height","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"width":{"description":"Native display width","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["width","height"],"type":"object"},"serial":{"description":"Resolved device serial","type":"string"},"status":{"description":"Session status (e.g. 'connected')","type":"string"},"videoAvailable":{"description":"Whether the scrcpy video stream is up. When false, the session still works for input/clipboard but screenshots fall back to adb screencap.","type":"boolean"}},"required":["status","serial","screenSize","videoAvailable","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Stop scrcpy Session"},"description":"Stop the active scrcpy session. Tools will fall back to ADB commands.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"stop_session","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable status message","type":"string"},"success":{"description":"Whether the session was stopped","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"openWorldHint":false,"readOnlyHint":true,"title":"Scrcpy Version"},"description":"Report which scrcpy version is being used by the MCP server. The version always describes the scrcpy-server file the session pushes: it comes from the SCRCPY_SERVER_VERSION environment variable, or from the scrcpy client belonging to the same install as that server, or a built-in default.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"version","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"source":{"description":"Which rung resolved the install: 'env' (SCRCPY_SERVER_VERSION env var), 'binary' (the scrcpy client found on PATH), 'server-sibling' (the client belonging to the server SCRCPY_SERVER_PATH names), 'package-manager' (the client of an install reported by dpkg/pacman/rpm/apk/brew), or 'default' (built-in constant)","enum":["env","binary","server-sibling","package-manager","default"],"type":"string"},"version":{"description":"Scrcpy version string (e.g. '4.0', '2.7')","type":"string"}},"required":["version","source"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"List Devices"},"description":"List all connected Android devices with their serial numbers, state, and model","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"device_list","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"count":{"description":"Number of connected devices","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"devices":{"description":"Connected devices","items":{"additionalProperties":false,"properties":{"model":{"description":"Device model","type":"string"},"product":{"description":"Product name","type":"string"},"serial":{"description":"Device serial number","type":"string"},"state":{"description":"Connection state (device, unauthorized, offline, ...)","type":"string"},"transportId":{"description":"ADB transport id","type":"string"}},"required":["serial","state"],"type":"object"},"type":"array"}},"required":["count","devices"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"Device Info"},"description":"Get detailed info about a device: model, Android version, screen size, SDK level, battery level","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number. If omitted, uses the only connected device.","type":"string"}},"type":"object"},"name":"device_info","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"androidVersion":{"description":"Android release version","type":["string","null"]},"batteryLevel":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Battery level percentage"},"brand":{"description":"Device brand","type":["string","null"]},"manufacturer":{"description":"Device manufacturer","type":["string","null"]},"model":{"description":"Device model","type":["string","null"]},"screenHeight":{"description":"Screen height in pixels","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"screenWidth":{"description":"Screen width in pixels","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"sdkLevel":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Android SDK API level"},"serial":{"description":"Resolved device serial","type":"string"}},"required":["serial","model","brand","manufacturer","androidVersion","sdkLevel","screenWidth","screenHeight","batteryLevel"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Turn Screen On"},"description":"Wake the device screen (turn screen on)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"screen_on","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the action succeeded","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Turn Screen Off"},"description":"Turn the device screen off","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"screen_off","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the action succeeded","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Connect over Wi-Fi"},"description":"Enable WiFi ADB and connect to the device wirelessly. Returns the connection address.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"port":{"default":5555,"description":"TCP port for ADB connection (default: 5555)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"connect_wifi","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"address":{"description":"The host:port the device was connected on","type":"string"},"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the wireless connection was established","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Disconnect Wi-Fi"},"description":"Disconnect from a wireless ADB device","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"address":{"description":"Device address (e.g., 192.168.1.100:5555)","type":"string"}},"required":["address"],"type":"object"},"name":"disconnect_wifi","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the action succeeded","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Rotate Device"},"description":"Rotate the device screen (requires active scrcpy session)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"rotate_device","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the action succeeded","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Expand Notifications"},"description":"Expand the notification panel (requires active scrcpy session)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"expand_notifications","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the action succeeded","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Expand Quick Settings"},"description":"Expand the quick settings panel (requires active scrcpy session)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"expand_settings","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the action succeeded","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Collapse Panels"},"description":"Collapse all open panels (notification, settings) (requires active scrcpy session)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"collapse_panels","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the action succeeded","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"Screenshot"},"description":"Take a screenshot of the Android device screen. Returns the image as base64.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"screenshot","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"encoding":{"description":"Encoding of the image data in the content block","type":"string"},"mimeType":{"description":"MIME type of the returned image","type":"string"},"source":{"description":"Capture path used (scrcpy frame or adb screencap)","type":"string"}},"required":["mimeType","encoding","source"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Start Screen Recording"},"description":"Start recording the screen. Recording continues until screen_record_stop is called.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"duration":{"description":"Max recording duration in seconds (optional, device limit usually 180s)","type":"number"},"remotePath":{"default":"/sdcard/scrcpy-mcp-recording.mp4","description":"Path on device to save recording","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"screen_record_start","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable status message","type":"string"},"remotePath":{"description":"Path on the device where the recording is saved","type":"string"},"success":{"description":"Whether recording was started","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Stop Screen Recording"},"description":"Stop screen recording and optionally pull the file to the host.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"localPath":{"description":"Local path to save recording (only if pullToHost is true)","type":"string"},"pullToHost":{"default":false,"description":"Pull the recording to the host machine","type":"boolean"},"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"screen_record_stop","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"localPath":{"description":"Host path the recording was pulled to, if requested","type":"string"},"message":{"description":"Human-readable status message","type":"string"},"success":{"description":"Whether recording was stopped","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Tap Screen"},"description":"Tap at the specified screen coordinates","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"},"x":{"description":"X coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Y coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["x","y"],"type":"object"},"name":"tap","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the action performed","type":"string"},"success":{"description":"Whether the input action was dispatched to the device","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Swipe Gesture"},"description":"Perform a swipe gesture from one point to another","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"duration":{"default":300,"description":"Duration in milliseconds","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"serial":{"description":"Device serial number","type":"string"},"x1":{"description":"Start X coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"x2":{"description":"End X coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"y1":{"description":"Start Y coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"y2":{"description":"End Y coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["x1","y1","x2","y2"],"type":"object"},"name":"swipe","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the action performed","type":"string"},"success":{"description":"Whether the input action was dispatched to the device","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Long Press"},"description":"Perform a long press at the specified coordinates","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"duration":{"default":500,"description":"Duration in milliseconds","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"serial":{"description":"Device serial number","type":"string"},"x":{"description":"X coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Y coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["x","y"],"type":"object"},"name":"long_press","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the action performed","type":"string"},"success":{"description":"Whether the input action was dispatched to the device","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Drag and Drop"},"description":"Perform a drag and drop gesture from one point to another. Uses input draganddrop on Android 8.0+ (API 26), falls back to swipe on older versions.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"duration":{"default":300,"description":"Duration in milliseconds","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"endX":{"description":"End X coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"endY":{"description":"End Y coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"serial":{"description":"Device serial number","type":"string"},"startX":{"description":"Start X coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"startY":{"description":"Start Y coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["startX","startY","endX","endY"],"type":"object"},"name":"drag_drop","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the action performed","type":"string"},"success":{"description":"Whether the input action was dispatched to the device","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Type Text"},"description":"Type text into the currently focused input field","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"},"text":{"description":"Text to type","type":"string"}},"required":["text"],"type":"object"},"name":"input_text","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the action performed","type":"string"},"success":{"description":"Whether the input action was dispatched to the device","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Send Key Event"},"description":"Send a key event to the device. Supports keycodes like HOME, BACK, ENTER, VOLUME_UP, etc.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"keycode":{"description":"Keycode name (e.g., 'HOME', 'BACK') or numeric value","type":["string","number"]},"serial":{"description":"Device serial number","type":"string"}},"required":["keycode"],"type":"object"},"name":"key_event","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the action performed","type":"string"},"success":{"description":"Whether the input action was dispatched to the device","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Scroll"},"description":"Scroll at the specified position. dx and dy are scroll amounts (-1 to 1 range approximated for ADB).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dx":{"description":"Horizontal scroll amount (negative=left, positive=right)","type":"number"},"dy":{"description":"Vertical scroll amount (negative=up, positive=down)","type":"number"},"serial":{"description":"Device serial number","type":"string"},"x":{"description":"X coordinate to scroll at","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Y coordinate to scroll at","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["x","y","dx","dy"],"type":"object"},"name":"scroll","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the action performed","type":"string"},"success":{"description":"Whether the input action was dispatched to the device","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Launch App"},"description":"Launch an app on the device. Uses scrcpy START_APP when a session is active for faster launch, falls back to ADB `am start`. Supports force-stop prefix (+) to stop the app before launching.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"packageName":{"description":"Package name to launch (e.g., 'com.example.app'). Prefix with '+' to force-stop the app first (e.g., '+com.example.app')","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"required":["packageName"],"type":"object"},"name":"app_start","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"source":{"description":"Mechanism used to launch the app (scrcpy or adb)","type":"string"},"success":{"description":"Whether the app was launched","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Force-Stop App"},"description":"Force-stop an app on the device.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"packageName":{"description":"Package name to force-stop (e.g., 'com.example.app')","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"required":["packageName"],"type":"object"},"name":"app_stop","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"success":{"description":"Whether the app was force-stopped","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Install APK"},"description":"Install an APK file on the device from the host machine.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"apkPath":{"description":"Absolute path to the APK file on the host machine","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"required":["apkPath"],"type":"object"},"name":"app_install","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Install result or error output from adb","type":"string"},"success":{"description":"Whether the APK installed successfully","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Uninstall App"},"description":"Uninstall an app from the device.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"packageName":{"description":"Package name to uninstall (e.g., 'com.example.app')","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"required":["packageName"],"type":"object"},"name":"app_uninstall","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Uninstall result or error output from adb","type":"string"},"success":{"description":"Whether the app was uninstalled","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"List Installed Apps"},"description":"List installed packages on the device. Optionally filter by name or restrict to system/third-party apps.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"filter":{"description":"Filter packages by name (partial match, case-insensitive)","type":"string"},"serial":{"description":"Device serial number","type":"string"},"system":{"description":"true = system apps only, false = third-party only, omit = all","type":"boolean"}},"type":"object"},"name":"app_list","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"count":{"description":"Number of packages returned","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"packages":{"description":"Installed package names","items":{"type":"string"},"type":"array"}},"required":["count","packages"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"Current Foreground App"},"description":"Get the currently foregrounded app package name and activity.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"app_current","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"activity":{"description":"Foreground activity name, if resolvable","type":["string","null"]},"packageName":{"description":"Package name of the foreground app","type":"string"}},"required":["packageName","activity"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"Get Clipboard"},"description":"Get the current clipboard content from the device. Uses scrcpy GET_CLIPBOARD when a session is active (works on Android 10+), falls back to ADB clipboard commands.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"clipboard_get","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"content":{"description":"Current clipboard text on the device","type":"string"},"source":{"description":"Mechanism used to read the clipboard (scrcpy or adb)","type":"string"}},"required":["content","source"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Set Clipboard"},"description":"Set the clipboard content on the device. Uses scrcpy SET_CLIPBOARD when a session is active (with optional paste flag), falls back to ADB clipboard commands.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"paste":{"default":false,"description":"Also simulate paste action (scrcpy only)","type":"boolean"},"serial":{"description":"Device serial number","type":"string"},"text":{"description":"Text to set in the clipboard","type":"string"}},"required":["text"],"type":"object"},"name":"clipboard_set","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable description of the result","type":"string"},"source":{"description":"Mechanism used to set the clipboard (scrcpy or adb)","type":"string"},"success":{"description":"Whether the clipboard was set","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"Dump UI Hierarchy"},"description":"Dump the full UI hierarchy of the current screen as XML. Useful for understanding screen structure before using ui_find_element.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"ui_dump","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"xml":{"description":"The UI hierarchy as a uiautomator XML document","type":"string"}},"required":["xml"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"Find UI Element"},"description":"Find UI elements on screen by text, resource ID, class name, or content description. Returns matching elements with their tap coordinates. At least one search criterion must be provided.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"className":{"description":"Class name to match exactly (e.g., 'android.widget.Button')","type":"string"},"contentDesc":{"description":"Content description to search for (partial match, case-insensitive)","type":"string"},"resourceId":{"description":"Resource ID to match exactly (e.g., 'com.app:id/button')","type":"string"},"serial":{"description":"Device serial number","type":"string"},"text":{"description":"Text content to search for (partial match, case-insensitive)","type":"string"}},"type":"object"},"name":"ui_find_element","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"count":{"description":"Number of matching elements","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"elements":{"description":"Matching UI elements with tap coordinates","items":{"additionalProperties":false,"properties":{"bounds":{"description":"Raw bounds string [x1,y1][x2,y2]","type":"string"},"className":{"description":"Widget class name","type":"string"},"clickable":{"description":"Whether the element is clickable","type":"boolean"},"contentDesc":{"description":"Content description (accessibility label)","type":"string"},"resourceId":{"description":"Resource ID of the element","type":"string"},"tapX":{"description":"X coordinate of the element center","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tapY":{"description":"Y coordinate of the element center","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"text":{"description":"Visible text of the element","type":"string"}},"required":["text","resourceId","className","contentDesc","bounds","tapX","tapY","clickable"],"type":"object"},"type":"array"}},"required":["count","elements"],"type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"ADB Shell Command"},"description":"Execute an arbitrary ADB shell command on the device and return the output. Use this for any device operation not covered by other tools.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"command":{"description":"Shell command to execute on the device","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"required":["command"],"type":"object"},"name":"shell_exec","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"output":{"description":"Combined stdout/stderr text from the command","type":"string"}},"required":["output"],"type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Push File to Device"},"description":"Push a file from the host machine to the device.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"localPath":{"description":"Absolute path to the file on the host machine","type":"string"},"remotePath":{"description":"Destination path on the device (e.g., /sdcard/myfile.txt)","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"required":["localPath","remotePath"],"type":"object"},"name":"file_push","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"adb push result or a confirmation message","type":"string"},"success":{"description":"Whether the file was pushed","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Pull File from Device"},"description":"Pull a file from the device to the host machine.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"localPath":{"description":"Destination absolute path on the host machine","type":"string"},"remotePath":{"description":"Path to the file on the device (e.g., /sdcard/myfile.txt)","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"required":["remotePath","localPath"],"type":"object"},"name":"file_pull","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"adb pull result or a confirmation message","type":"string"},"success":{"description":"Whether the file was pulled","type":"boolean"}},"required":["success","message"],"type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"List Directory"},"description":"List directory contents on the device.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"path":{"description":"Absolute path to the directory on the device (e.g., /sdcard/)","type":"string"},"serial":{"description":"Device serial number","type":"string"}},"required":["path"],"type":"object"},"name":"file_list","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"count":{"description":"Number of entries returned","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"entries":{"description":"Directory entries","items":{"additionalProperties":false,"properties":{"date":{"description":"Modification date/time","type":"string"},"group":{"description":"Owner group","type":"string"},"isDirectory":{"description":"Whether the entry is a directory","type":"boolean"},"name":{"description":"Entry name","type":"string"},"owner":{"description":"Owner user","type":"string"},"permissions":{"description":"Permission string (e.g. -rw-r--r--)","type":"string"},"size":{"description":"Size in bytes (0 for special files)","type":"number"}},"required":["name","permissions","owner","group","size","date","isDirectory"],"type":"object"},"type":"array"},"path":{"description":"The directory that was listed","type":"string"}},"required":["path","count","entries"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Start Video Stream"},"description":"Start an HTTP MJPEG video stream of the device screen and open a viewer window (ffplay). Starts a scrcpy session automatically if needed.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"port":{"default":7183,"description":"HTTP port for the MJPEG stream (default 7183)","maximum":65535,"minimum":1024,"type":"integer"},"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"start_video_stream","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"screenSize":{"additionalProperties":false,"description":"Native display resolution — tap/swipe use these native coordinates (no scaling)","properties":{"height":{"description":"Native display height","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"width":{"description":"Native display width","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["width","height"],"type":"object"},"status":{"description":"Stream status (e.g. 'started')","type":"string"},"url":{"description":"HTTP URL of the MJPEG stream","type":"string"},"viewer":{"description":"Viewer status message","type":"string"}},"required":["status","url","screenSize","viewer"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Stop Video Stream"},"description":"Stop the HTTP MJPEG video stream and close the viewer window for a device.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"serial":{"description":"Device serial number","type":"string"}},"type":"object"},"name":"stop_video_stream","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"message":{"description":"Human-readable status message","type":"string"},"status":{"description":"Stream status (e.g. 'stopped')","type":"string"}},"required":["status","message"],"type":"object"}}]}}}
