Skip to main content
Glama

adb_tunnel_open

Creates a managed ADB tunnel between host and device, automatically assigning a free host port for forward connections. Returns an opaque tunnel ID for later cleanup.

Instructions

Open a managed tunnel between host and device. Higher-level convenience wrapper over adb_forward / adb_reverse: auto-picks a free host port when one isn't specified (forward only), returns an opaque tunnel ID for later close, and registers cleanup so the tunnel is removed on server exit. Direction 'forward' = host port forwards TO device service; 'reverse' = device port forwards TO host service.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionYes'forward' (host → device) or 'reverse' (device → host)
deviceSpecYesDevice-side spec, e.g., 'tcp:3000' or 'localabstract:app_socket'
hostSpecNoHost-side spec, e.g., 'tcp:8080'. For 'forward' direction: omit to auto-pick a free host port. For 'reverse' direction: required (can't auto-pick device-side ports without an extra probe call).
deviceNoDevice serial
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses automatic port selection (forward only), opaque tunnel ID return, and cleanup on server exit. It does not detail failure modes, permissions, or concurrency limits, but covers core behaviors adequately.

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 three sentences long, front-loads the core purpose, and each sentence adds distinct information (convenience wrapper, port selection, direction semantics). No redundant or extraneous text.

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?

For a tool with 4 parameters and no output schema, the description explains the return value (tunnel ID) and lifecycle cleanup. Combined with schema details and sibling tools for close/list, it provides sufficient context for use. It could mention a warning about tunnel limit or failure cases, but overall is complete.

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%, but the description adds value by explaining the behavioral difference between forward and reverse, the optional nature of hostSpec for forward, and the implication for reverse. This context goes beyond the schema's type constraints.

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 it opens a managed tunnel, distinguishes from lower-level siblings (adb_forward/adb_reverse) by labeling itself a convenience wrapper, and explains the direction semantics. It explicitly mentions auto-pick of host port for forward, return of tunnel ID, and cleanup registration.

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

Usage Guidelines4/5

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

The description identifies this as a higher-level alternative to adb_forward/adb_reverse, implying use when auto-port selection or managed lifecycle is desired. It notes that hostSpec is optional for forward but required for reverse. However, it does not explicitly exclude specific scenarios or list preconditions.

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/fullread/DeepADB'

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