Skip to main content
Glama

Connect to a device over TCP/IP

connect
Idempotent

Establish an ADB TCP/IP link to an Android device using host:port, adding it to the available device list for wireless debugging and control.

Instructions

Connect adb to a device over TCP/IP (adb connect <host>:<port>), e.g. "192.168.1.42:5555"; a successful connect adds the device to list_devices. Not device-scoped: the address selects the device, and no serial exists until the connection is established. IPv6 literals (e.g. "[::1]:5555") and a bare host without :port are not accepted; specify host:port explicitly. On Android 10+ enable Wireless debugging on the device first; on Android 11+ that also needs a one-time pairing first — call wireless_pair with the code from the Wireless debugging screen, then connect to the port shown there (the pairing port and this connect port are different).

Input Schema

NameRequiredDescriptionDefault
addressYesDevice TCP address as "host:port", e.g. "192.168.1.42:5555" (the port is shown in the Wireless debugging settings).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false, idempotentHint=true, openWorldHint=true, but the description adds effects the annotations cannot convey: a successful connect mutates the device list visible to list_devices, and no serial exists until the connection is established. It also discloses platform preconditions and the pairing-port/connect-port distinction.

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

Conciseness4/5

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

Front-loaded with the operation, the command form, and a concrete example, then the constraints and prerequisites. It is dense and single-paragraph, and the Android 10/11 prerequisite sentence is long, but every clause carries actionable information with no filler.

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

Completeness5/5

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

For a single-parameter connect tool with no output schema, the description covers the effect of success/invocation target, valid and invalid address forms, and the full prerequisite chain. Nothing needed to call it correctly is missing, and return-format detail is unnecessary.

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?

Schema coverage is 100% and the schema already documents the host:port format with an example, so the baseline is 3. The description goes further by describing rejection rules (no IPv6 literals, no bare host) and clarifying that the address, not a serial, identifies the target, adding real meaning beyond the schema.

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?

States a specific verb+resource ('Connect adb to a device over TCP/IP') and immediately maps it to the underlying command. It also distinguishes itself from siblings by noting it is not device-scoped and that the address selects the device, contrasting with the serial-based tools in the sibling list.

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?

Explicitly names the alternative wireless_pair and the exact conditions that select it (Android 11+ one-time pairing, then connect to the port shown in Wireless debugging). It also states exclusions directly: IPv6 literals and bare hosts are not accepted.

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