Skip to main content
Glama

ports

Reverse or forward TCP ports between the host and Android over adb, forward browser DevTools, then list or remove mappings to reach services from either side.

Instructions

Connects ports between the host and Android over adb. reverse makes a host server reachable from Android (reverse tcp:8000 tcp:8000, then open http://127.0.0.1:8000 in Android). forward makes an Android socket reachable from the host. devtools forwards a Chromium-based browser's DevTools to a host port and lists its pages. remove undoes one, list shows all.

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": {
      "action": "<action>"
    },
    "name": "ports"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostNoHost side, such as tcp:8000.
portNoFor devtools: the host port.
actionYes
androidNoAndroid side, such as tcp:8000 or localabstract:chrome_devtools_remote.
directionNoFor remove.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose mode-level effects plus one non-obvious side effect: devtools 'lists its pages' in addition to forwarding a port. It says nothing about failure behavior (removing a mapping that does not exist), whether mappings persist, or required device/adb state, which matters for a multi-mode mutation tool.

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?

One dense paragraph with the general purpose front-loaded and each action as a short clause; the parenthetical reverse example earns its space by clarifying syntax and usage. Minor looseness in 'Connects ports' is the only wasted wording.

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 5-parameter, 5-action tool with no output schema, the description covers every action mode and hints at output for devtools. The remaining gap is which parameters are required per action (only 'action' is required, direction/port are conditional), which an agent must infer from the schema.

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 80%, so the baseline is 3; the description does add a concrete spec pair ('tcp:8000 tcp:8000') illustrating host/android syntax and ties 'port' to devtools ('forwards ... to a host port'). However it never mentions the 'direction' parameter needed for remove, nor which of host/android applies to each action, so it only marginally exceeds 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 and resource ('Connects ports between the host and Android over adb') and then enumerates every action mode (reverse, forward, devtools, remove, list) with a one-line meaning for each. An agent can tell exactly what this tool does without opening the schema, and the sibling list contains no overlapping port/forwarding tool.

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?

Each action gets conditional guidance tied to a goal: use reverse when a host server must be reachable from Android, forward when an Android socket must be reachable from the host, devtools for browser DevTools, remove to undo, list to inspect. The concrete example 'reverse tcp:8000 tcp:8000, then open http://127.0.0.1:8000' makes the selection obvious. It stops short of exclusions or prerequisites (e.g. adb device connection), so it is not a 5.

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