Skip to main content
Glama

start_screen_record

Initiate screen recording on Android devices for UI testing, debugging, and visual QA workflows. Record up to 180 seconds with background operation.

Instructions

Start recording the screen. Max duration is 180 seconds. Recording runs in background - use stop_screen_record to stop early.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
duration_secondsNo
filenameNorecording
device_serialNo

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the start_screen_record tool. It launches screenrecord in the background on the device with a configurable duration and filename, returning the remote path of the recording.
    @mcp.tool() def start_screen_record( duration_seconds: int = 30, filename: str = "recording", device_serial: str | None = None ) -> str: """ Start recording the screen. Max duration is 180 seconds. Recording runs in background - use stop_screen_record to stop early. """ duration = min(duration_seconds, 180) timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") remote_path = f"/sdcard/{filename}_{timestamp}.mp4" # Start recording in background run_adb([ "shell", "nohup", "screenrecord", "--time-limit", str(duration), remote_path, "&" ], device_serial) return f"Recording started: {remote_path} (max {duration}s). Use stop_screen_record to stop early."

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rahulkr/r_adb_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server