Skip to main content
Glama
rahulkr
by rahulkr

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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."
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: the recording runs in the background, has a maximum duration of 180 seconds, and requires 'stop_screen_record' to stop early. However, it doesn't mention permissions, file format, or storage location, which are gaps for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and uses only two concise sentences that each provide essential information—no wasted words. It efficiently conveys key constraints and usage instructions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a background recording operation with 3 parameters and no annotations), the description covers the core behavior and usage well. However, it lacks details on output (though an output schema exists, so this is mitigated) and doesn't fully address all parameters, leaving some gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It implies a 'duration_seconds' parameter by mentioning 'Max duration is 180 seconds' but doesn't explain the other two parameters ('filename', 'device_serial'). This adds some meaning but falls short of fully compensating for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Start recording the screen') and resource (the screen), distinguishing it from sibling tools like 'screenshot' or 'stop_screen_record'. It explicitly defines the tool's function without being tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool (to start recording) and when to use an alternative ('use stop_screen_record to stop early'). It also mentions the maximum duration constraint, which helps in decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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