pull_recordings
Transfer screen recordings from Android devices to a local directory for analysis, testing, or backup purposes.
Instructions
Pull all screen recordings from device to local directory
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pull_recordings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| local_dir | No | ./recordings | |
| device_serial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/adb_mcp_server/server.py:219-240 (handler)The main handler function for the 'pull_recordings' tool. It lists MP4 files in /sdcard/, pulls them using adb pull to the specified local directory, and returns the list of pulled files.
@mcp.tool() def pull_recordings( local_dir: str = "./recordings", device_serial: str | None = None ) -> str: """Pull all screen recordings from device to local directory""" os.makedirs(local_dir, exist_ok=True) # List recordings files = run_adb(["shell", "ls", "/sdcard/*.mp4"], device_serial) if "No such file" in files or not files.strip(): return "No recordings found on device" pulled = [] for f in files.strip().split('\n'): f = f.strip() if f.endswith('.mp4'): local_path = os.path.join(local_dir, os.path.basename(f)) run_adb(["pull", f, local_path], device_serial) pulled.append(local_path) return f"Pulled {len(pulled)} recordings to {local_dir}: {pulled}"