Skip to main content
Glama

port_forward

List, add, or remove ADB forward/reverse mappings for TCP, local abstract, local filesystem, or JDWP endpoints; use tcp:0 to allocate a port without replacing another debugger's mapping.

Instructions

ADB forward/reverse list/add/remove for tcp/localabstract/localfilesystem/jdwp endpoints. tcp:0 allocates a port. No host shell; no-rebind avoids replacing another debugger's mapping.

Input Schema

NameRequiredDescriptionDefault
localNo
actionNolist
remoteNo
reverseNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add useful behavior: tcp:0 allocates an ephemeral port, and the no-rebind default avoids clobbering another debugger's mapping. It does not state that add/remove mutate the device forwarding table, whether changes persist, or what privileges are needed.

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?

Three short sentences, front-loaded with the verb and resource, with no filler. The dotted-domain phrasing is terse but each clause adds information; it stops just short of being cryptic.

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?

Since an output schema exists, return values need not be described, and the description covers endpoint types, port allocation, and the no-rebind safety behavior. Remaining gaps (mutation effects of add/remove, prerequisite adb authorization) are real but modest for a 4-parameter tool.

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 0%, so the description must compensate, and it partially does: 'tcp:0 allocates a port' clarifies the endpoint spec syntax, and 'forward/reverse' and 'list/add/remove' map onto the reverse and action parameters. It never explains the local/remote string formats per endpoint type or enumerates valid action values, so the compensation is incomplete.

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 names the specific resource (ADB forward/reverse mappings) and the operations (list/add/remove) plus supported endpoint types (tcp/localabstract/localfilesystem/jdwp). An agent can distinguish this from generic command tools, though it does not name the closest sibling (adb_command) explicitly.

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?

There is no explicit when-to-use guidance or routing advice relative to adb_command or shell_execute. The phrase 'No host shell' hints at a boundary but is a constraint, not a condition that selects this tool over alternatives.

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