Skip to main content
Glama

Port forward

forward

Creates persistent local TCP port mappings to peer-reachable host:port targets; omit the mapping to list active tunnels.

Instructions

Forward a local TCP port to a host:port reachable from the peer (like ssh -L), e.g. "15432:db.internal:5432" or "8080:80" (the peer itself). The forward keeps running in the rockd daemon until unforward. Without spec: list running forwards.

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": {
      "peer": "<peer>"
    },
    "name": "forward"
  }
}

Input Schema

NameRequiredDescriptionDefault
peerYesThe peer's 9-digit rockd ID (from `devices` / `status`), or IP:port to dial directly
specNo<local port>:[<host>:]<port>

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true; the description adds the important lifecycle fact that the forward persists in the rockd daemon until explicitly unforwarded, and reveals that the no-spec call is a listing operation rather than a mutation. It stops short of covering auth requirements, port-conflict behavior, or what the listing returns.

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?

Three short sentences, each carrying distinct information: the operation, the concrete formats, the persistence model, and the no-spec listing mode. No filler and the core purpose is front-loaded.

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 network-mutation tool with no output schema and fully documented parameters, this covers purpose, format, and lifetime adequately. Remaining gaps are minor: whether forwards survive daemon restarts, error behavior on port conflicts, and the shape of the listing output.

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%, so the schema already documents both parameters. The description usefully disambiguates the spec grammar with examples ('15432:db.internal:5432' and '8080:80' meaning the peer itself), which resolves the schema's ambiguous '<local port>:[<host>:]<port>' notation, but the gain over the schema is modest.

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 (forward a local TCP port) plus the exact ssh -L analogy and two concrete spec examples, so an agent knows precisely what the tool does and can distinguish it from unforward, which is named as the terminating counterpart.

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?

Clearly establishes the two modes: with a spec it creates a forward, without a spec it lists running forwards. The 'until unforward' phrasing implies the stopping alternative, but there is no explicit when-not guidance or statement of prerequisites such as required peer reachability or permissions.

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