Skip to main content
Glama

android_start_scrcpy_stream

Start continuous fast frame capture from Android devices using scrcpy for screen streaming and control.

Instructions

Start scrcpy streaming for continuous fast frame capture (requires scrcpy installed)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceSerialNoSpecific device serial number to target (optional)

Implementation Reference

  • The core handler function for the 'android_start_scrcpy_stream' tool. It extracts arguments, calls adb.startScrcpyStream, and returns success or error response.
    export async function handleStartScrcpyStream(adb: ADBWrapper, args: StartScrcpyStreamArgs): Promise<{ content: Array<{ type: string; text: string }> }> {
      const { deviceSerial } = args;
    
      try {
        await adb.startScrcpyStream(deviceSerial);
    
        return {
          content: [
            {
              type: 'text',
              text: 'Scrcpy streaming started successfully. Use getLatestFrame to retrieve frames.',
            },
          ],
        };
      } catch (error) {
        throw new Error(`Failed to start scrcpy stream: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • The input schema definition for the tool, registered in the listTools handler.
    {
      name: 'android_start_scrcpy_stream',
      description: 'Start scrcpy streaming for continuous fast frame capture (requires scrcpy installed)',
      inputSchema: {
        type: 'object',
        properties: {
          deviceSerial: {
            type: 'string',
            description: 'Specific device serial number to target (optional)',
          },
        },
      },
    },
  • src/index.ts:494-495 (registration)
    The switch case that registers and dispatches the tool call to the handler function.
    case 'android_start_scrcpy_stream':
      return await handleStartScrcpyStream(this.adb, args as any);
  • TypeScript interface defining the input arguments for the handler, matching the tool schema.
    interface StartScrcpyStreamArgs {
      deviceSerial?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only mentions the scrcpy installation prerequisite. It doesn't disclose whether this starts a background process, consumes resources, requires specific permissions, has rate limits, or how to access the streamed frames. For a streaming tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence that front-loads the core purpose and includes a crucial prerequisite. Every word earns its place with no wasted text.

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

Completeness2/5

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

For a streaming tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'continuous fast frame capture' means operationally, how frames are accessed, whether the stream persists across tool calls, or what happens if scrcpy isn't installed. Given the complexity and lack of structured data, more context is needed.

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 100% with one optional parameter clearly documented in the schema. The description adds no parameter information beyond what the schema provides, so it meets the baseline for high schema coverage but doesn't add extra value.

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

Purpose4/5

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

The description clearly states the action ('Start scrcpy streaming') and purpose ('for continuous fast frame capture'), which distinguishes it from single-frame capture tools like android_capture_frame_scrcpy or android_screenshot. However, it doesn't explicitly differentiate from android_stop_scrcpy_stream beyond the obvious start/stop distinction.

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

Usage Guidelines3/5

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

The description implies usage when continuous frame capture is needed versus single-frame alternatives, but doesn't explicitly state when to use this tool versus android_capture_frame_scrcpy or android_get_latest_frame. The prerequisite 'requires scrcpy installed' provides some context but no explicit when-not-to-use guidance.

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/jduartedj/android-mcp-server'

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