Skip to main content
Glama
desamtralized

ADB Screenshot MCP Server

adb_disconnect

Disconnect from a WiFi ADB device by specifying its IP address and port to end remote Android device management sessions.

Instructions

Disconnect from a WiFi ADB device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ip_addressYesIP address of the device to disconnect from
portNoPort number (default: 5555)5555

Implementation Reference

  • The handler for the 'adb_disconnect' tool. It destructures the input arguments (ip_address and optional port), executes the 'adb disconnect' command using execAsync, and returns a text response with the stdout.
    case "adb_disconnect": {
      const { ip_address, port = "5555" } = args as {
        ip_address: string;
        port?: string;
      };
    
      const { stdout, stderr } = await execAsync(`adb disconnect ${ip_address}:${port}`);
      
      return {
        content: [
          {
            type: "text",
            text: `Disconnected from ${ip_address}:${port}\n${stdout}`,
          },
        ],
      };
    }
  • The input schema for the 'adb_disconnect' tool, defining required ip_address and optional port with descriptions.
    {
      name: "adb_disconnect",
      description: "Disconnect from a WiFi ADB device",
      inputSchema: {
        type: "object",
        properties: {
          ip_address: {
            type: "string",
            description: "IP address of the device to disconnect from",
          },
          port: {
            type: "string",
            description: "Port number (default: 5555)",
            default: "5555",
          },
        },
        required: ["ip_address"],
      },
    },
  • src/index.ts:30-113 (registration)
    The tool is registered in the ListToolsRequestSchema handler by including it in the tools array returned.
    return {
      tools: [
        {
          name: "adb_connect_wifi",
          description: "Connect to an Android device over WiFi using ADB",
          inputSchema: {
            type: "object",
            properties: {
              ip_address: {
                type: "string",
                description: "IP address of the Android device",
              },
              port: {
                type: "string",
                description: "Port number (default: 5555)",
                default: "5555",
              },
            },
            required: ["ip_address"],
          },
        },
        {
          name: "adb_screenshot",
          description: "Take a screenshot of the connected Android device",
          inputSchema: {
            type: "object",
            properties: {
              output_path: {
                type: "string",
                description: "Local path to save the screenshot (default: screenshot.png)",
                default: "screenshot.png",
              },
              device_id: {
                type: "string",
                description: "Device ID/serial (optional, uses first device if not specified)",
              },
            },
            required: [],
          },
        },
        {
          name: "adb_list_devices",
          description: "List all connected ADB devices",
          inputSchema: {
            type: "object",
            properties: {},
            required: [],
          },
        },
        {
          name: "adb_disconnect",
          description: "Disconnect from a WiFi ADB device",
          inputSchema: {
            type: "object",
            properties: {
              ip_address: {
                type: "string",
                description: "IP address of the device to disconnect from",
              },
              port: {
                type: "string",
                description: "Port number (default: 5555)",
                default: "5555",
              },
            },
            required: ["ip_address"],
          },
        },
        {
          name: "adb_device_info",
          description: "Get information about a connected device",
          inputSchema: {
            type: "object",
            properties: {
              device_id: {
                type: "string",
                description: "Device ID/serial (optional, uses first device if not specified)",
              },
            },
            required: [],
          },
        },
      ],
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action but lacks behavioral details: it doesn't specify if this requires prior connection, what happens on success/failure (e.g., error if not connected), or side effects (e.g., device becomes unavailable). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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, clear sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized for a simple tool, earning full marks for efficiency.

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?

Given the tool's complexity (a mutation operation), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like success conditions, error handling, or dependencies (e.g., needing an active connection). For a disconnect tool, this leaves critical context gaps for an AI agent.

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%, so the schema fully documents both parameters (ip_address and port with default). The description adds no parameter-specific information beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema handles all parameter semantics.

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 ('Disconnect from') and target resource ('a WiFi ADB device'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'adb_connect_wifi' or 'adb_list_devices', but the verb 'Disconnect' inherently contrasts with 'Connect' and 'List', so it's clear but not explicitly comparative.

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. It doesn't mention prerequisites (e.g., must be connected first), exclusions, or relationships with siblings like 'adb_connect_wifi' for reconnection or 'adb_list_devices' to check status. Usage is implied by the action but not explicitly stated.

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/desamtralized/adb-mcp'

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