Skip to main content
Glama

Forward a host port to the device

forward_port
Idempotent

Create an ADB port forward from host to Android device to reach device-side app HTTP or debug servers from host-only test tools.

Instructions

Create a port forward from the host to the device (adb forward), e.g. local "tcp:8080" to remote "tcp:8080". Use it to reach a device-side server (app HTTP server, debug port) from host-only test tooling.

Input Schema

NameRequiredDescriptionDefault
localYesHost-side spec, e.g. "tcp:8080".
deviceNoDevice serial from list_devices; optional when exactly one device is connected.
remoteYesDevice-side spec, e.g. "tcp:8080" or "localabstract:webview_devtools_remote".
no_rebindNoPass --no-rebind to fail instead of replacing an existing forward (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare the operation is a non-read, non-destructive, idempotent, closed-world mutation, so the safety profile is covered. The description adds directional context and an example, but says nothing about lifecycle (the forward persists until remove_forward) or the rebind behavior, which are the traits an agent most needs. Adds modest value beyond annotations.

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 sentences, front-loaded with the verb+resource, then the use case. No filler, and the `adb forward` reference plus usage rationale both earn their place.

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?

No output schema exists, so return values need no explanation, and annotations cover the mutation profile. The one meaningful omission is that a created forward is persistent and must be cleaned up with remove_forward, which an agent setting up host-only test tooling would benefit from knowing.

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 already documents all four parameters including the `tcp:8080` and `localabstract:...` forms. The description's example echoes what the schema provides and adds no new syntax or constraint detail, so baseline 3 applies.

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+resource ("Create a port forward from the host to the device") and anchors it to the underlying `adb forward` command. The host-to-device direction implicitly separates it from reverse_port, but no sibling is named explicitly, so an agent must infer the contrast.

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 it to reach a device-side server (app HTTP server, debug port) from host-only test tooling" gives a concrete when-to-use condition. It does not name when-not-to-use or point to reverse_port/remove_forward as alternatives, so routing guidance is clear but not complete.

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