Skip to main content
Glama
renef-mcp
by Ahmeth4n

renef_port_forward

Manage ADB TCP port forwarding rules for the server or rootless gadget mode: list active forwards, add local-to-remote mappings, and remove one or all rules.

Instructions

Manage ADB TCP port forwarding rules for renef_server or rootless gadget mode.

Actions:

  • status (default): List all active ADB port forwards

  • add: Add adb forward tcp:<local_port> <remote> (defaults to configured port -> RuntimeInit UDS; or if gadget_pid > 0, forwards to localabstract:renef_pl_<gadget_pid>)

  • remove: Remove forwarding rule for tcp:<local_port>

  • remove_all: Remove all ADB port forwarding rules

Args: action: "status", "add", "remove", or "remove_all" local_port: Local TCP port (0 = use configured RENEF_PORT / 1907) remote: Remote endpoint (default: "localabstract:com.android.internal.os.RuntimeInit", or e.g. "tcp:1907" when server runs with --transport TCP) gadget_pid: Optional PID for gadget mode (localabstract:renef_pl_<pid>)

Returns: JSON status with active rules or operation result

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "renef_port_forward"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionNostatus
remoteNo
gadget_pidNo
local_portNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the concrete side effects: what `add` wires up, what `remove` targets, and that `remove_all` wipes every rule. It also names the return payload ("JSON status with active rules or operation result"). Gaps remain around permissions, failure modes, and whether operations are idempotent.

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?

The Actions/Args/Returns layout is front-loaded and scannable, with defaults stated inline. There is mild redundancy in that the Args section restates the action values already listed above, but the repetition is short and does not obscure meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter forwarding manager with no annotations, the definition covers action semantics, defaults, endpoint derivation, and the return shape; an output schema also exists, so return values need no further elaboration. Nothing essential for correct invocation appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet all four parameters are explained: `action` gets an enumerated value set with default, `local_port` explains the 0 sentinel (configured RENEF_PORT / 1907), `remote` gives the default endpoint plus the `tcp:1907` alternative for TCP transport, and `gadget_pid` shows the resulting abstract socket name. This fully compensates for the bare 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?

The description opens with a specific verb and resource ("Manage ADB TCP port forwarding rules") and immediately enumerates the four concrete actions with their effects. An agent can distinguish this from siblings like renef_server or renef_attach without opening the schema.

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?

It clearly signals that `status` is the default and explains the conditional selection inside `add` (configured port -> RuntimeInit UDS vs `localabstract:renef_pl_<gadget_pid>` when `gadget_pid > 0`). It does not say when to use this tool rather than a sibling or what prerequisites must hold (adb available, server running), so no explicit exclusions are given.

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