Skip to main content
Glama

adb_reverse

Reverse-forward a device port to a host port so device apps can reach services running on your machine.

Instructions

Reverse-forward a device port to a port on the host (device → host). Use for letting device apps reach services on your machine.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "remote": "<remote>",
      "local": "<local>"
    },
    "name": "adb_reverse"
  }
}

Input Schema

NameRequiredDescriptionDefault
localYesLocal (host) spec, e.g., 'tcp:3000'. AF2 fix: format-validated.
deviceNoDevice serial
remoteYesRemote (device) spec, e.g., 'tcp:3000'. AF2 fix: format-validated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed5 schema fields changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / local / description
      Previous value: -"Local (host) spec, e.g., 'tcp:3000'"New value: +"Local (host) spec, e.g., 'tcp:3000'. AF2 fix: format-validated."
    • addedInput schema / properties / local / pattern
      Added value: +"^(tcp:\\d{1,5}|localabstract:[A-Za-z0-9_./-]+|localreserved:[A-Za-z0-9_./-]+|localfilesystem:[A-Za-z0-9_./-]+|dev:[A-Za-z0-9_./-]+|jdwp:\\d+)$"
    • changedInput schema / properties / remote / description
      Previous value: -"Remote (device) spec, e.g., 'tcp:3000'"New value: +"Remote (device) spec, e.g., 'tcp:3000'. AF2 fix: format-validated."
    • addedInput schema / properties / remote / pattern
      Added value: +"^(tcp:\\d{1,5}|localabstract:[A-Za-z0-9_./-]+|localreserved:[A-Za-z0-9_./-]+|localfilesystem:[A-Za-z0-9_./-]+|dev:[A-Za-z0-9_./-]+|jdwp:\\d+)$"
  3. First observedv1.1.1

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It clarifies the operation's direction — the most confusable aspect versus adb_forward — but says nothing about whether the mapping persists across device reconnects, what happens if the host port is already bound, or whether elevated privileges are required.

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?

Two short sentences with zero filler; the operation and its direction are front-loaded before the use case. Every clause earns its place.

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?

For a simple 3-parameter forwarding tool with full schema coverage and no output schema, the definition covers the essentials. It is nonetheless thin on lifecycle details (persistence, cleanup via adb_reverse_remove) that matter for a stateful port mapping.

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 coverage is 100%, with both 'local' and 'remote' individually described and regex-constrained, so the baseline is 3. The description adds the mapping of remote→device and local→host at a conceptual level, but offers no concrete syntax examples beyond what the schema already shows.

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?

States a specific verb and resource ('reverse-forward a device port to a port on the host') and pins the direction with an explicit 'device → host' arrow. That direction marker is what separates it from the sibling adb_forward, though the sibling is never named.

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?

'Use for letting device apps reach services on your machine' gives a concrete scenario that justifies choosing this over adb_forward. It stops short of explicit when-not guidance (e.g., 'use adb_forward for host→device bridging') or noting the matching adb_reverse_remove cleanup step.

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

Deploy Server

Other Tools