Skip to main content
Glama

Stop port forward

unforward

Stops an active port forward for a specified peer and local port, ending the connection created by the corresponding forwarding request.

Instructions

Stop a forward started with forward.

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>",
      "local_port": "<local_port>"
    },
    "name": "unforward"
  }
}

Input Schema

NameRequiredDescriptionDefault
peerYesThe peer's 9-digit rockd ID (from `devices` / `status`), or IP:port to dial directly
local_portYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare the mutation (readOnlyHint=false) and openWorldHint=true, so safety is partly covered. The description adds the lifecycle prerequisite that the target must have been created by `forward`, which is genuinely useful context, but it says nothing about whether active connections are terminated, whether a missing forward raises an error, or how identity is matched.

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?

A single front-loaded sentence with no filler, but the terseness crosses into under-specification for a stateful teardown operation. No structural issues, just insufficient content.

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

Completeness2/5

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

For a two-required-parameter stateful mutation with no output schema and incomplete parameter documentation, the description should explain matching semantics, failure behavior when the forward is absent, and the effect on in-flight connections. None of that is present.

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

Parameters2/5

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

Schema coverage is only 50%: `peer` is documented in the schema while `local_port` has no description at all. The description adds no parameter meaning, and critically does not state that the (peer, local_port) pair must match the original forward invocation in order to identify the correct forward.

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 ("Stop") and resource ("a forward started with forward") and links it to the sibling tool that creates it, so an agent can distinguish it from other session-mutating siblings like shell or spawn. It stops short of saying what exactly is torn down (the listener only, or also active tunnels), but the action itself is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: call this on a forward that already exists via `forward`. There is no explicit statement of when not to use it, what happens if no matching forward exists, or whether a re-forward is needed after stopping.

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