Skip to main content
Glama

android_stop_scrcpy_stream

Stop screen mirroring from Android devices to computers using scrcpy. This tool terminates active streaming sessions for device management.

Instructions

Stop scrcpy streaming

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for the 'android_stop_scrcpy_stream' tool. It calls the ADBWrapper's stopScrcpyStream method and returns a success message or throws an error.
    export async function handleStopScrcpyStream(adb: ADBWrapper, args: StopScrcpyStreamArgs): Promise<{ content: Array<{ type: string; text: string }> }> {
      try {
        await adb.stopScrcpyStream();
    
        return {
          content: [
            {
              type: 'text',
              text: 'Scrcpy stream stopped successfully.',
            },
          ],
        };
      } catch (error) {
        throw new Error(`Failed to stop scrcpy stream: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • Core implementation that terminates the scrcpy subprocess and cleans up the latest frame buffer and process reference.
    async stopScrcpyStream(): Promise<void> {
      if (this.scrcpyProcess) {
        this.scrcpyProcess.kill('SIGTERM');
        this.scrcpyProcess = null;
        this.latestFrame = null;
      }
    }
  • Tool schema definition including name, description, and empty input schema in the ListTools response.
      name: 'android_stop_scrcpy_stream',
      description: 'Stop scrcpy streaming',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:496-497 (registration)
    Registration in the CallToolRequestSchema switch statement that dispatches to the handler function.
    case 'android_stop_scrcpy_stream':
      return await handleStopScrcpyStream(this.adb, args as any);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Stop') but doesn't explain what happens when invoked (e.g., whether it terminates an active stream gracefully, frees resources, or has side effects). This is a significant gap for a tool that likely involves resource management.

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 extremely concise with just three words, front-loading the essential action. There's no wasted text, making it efficient and easy to parse, which is ideal for a simple tool with no parameters.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but lacks completeness. It doesn't address behavioral aspects like what 'Stop' entails or dependencies on other tools, leaving gaps that could confuse an agent about proper usage.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter information, which is appropriate here, earning a baseline score of 4 for not introducing unnecessary details.

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 verb ('Stop') and resource ('scrcpy streaming'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'android_start_scrcpy_stream', but the action is specific enough to infer it's the counterpart to starting the stream.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives or any prerequisites. It doesn't mention that it should be used after starting a stream with 'android_start_scrcpy_stream' or warn against using it if no stream is active, leaving usage context unclear.

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