Skip to main content
Glama

Remove port forwarding rule

remove_port_forwarding
DestructiveIdempotent

Deletes a port forwarding rule by index or external port, optionally narrowed by protocol; dry-run defaults to true and ambiguous or protected matches are refused.

Instructions

Delete a port forwarding rule, selected by index (from get_port_forwarding) or by port. Refuses ambiguous matches and protected ports. dry_run is TRUE by default. Re-create with set_port_forwarding.

Input Schema

NameRequiredDescriptionDefault
portNoExternal port, if index is unknown
indexNoRule index hash
dry_runNoDefault true
protocolNoNarrow a port match to tcp/udp

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.9.0

TDQS

A4.4/5.0
Behavior4/5

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

Goes beyond the annotations (destructive, idempotent, not read-only) by disclosing refusal behavior on ambiguous matches and protected ports, plus the dry_run default that turns a destructive call into a preview. It doesn't say what the refusal or dry-run response looks like, which is the remaining gap for a destructive tool.

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?

Four short sentences, each carrying distinct information: action, selectors, safety constraints, and the recovery path. Key risk facts (dry_run default, refusals) are not buried.

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 4-parameter destructive mutation with no output schema, the definition covers selection, safety refusals, the safe default, and the counterpart set tool. Only the shape of success/refusal results is unaddressed, which is a minor omission given annotations already flag destructiveness.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds semantics the schema lacks: index originates from get_port_forwarding, port is the fallback selector, and dry_run being TRUE by default means a bare call is non-destructive. It leaves the protocol parameter's narrowing role to the schema alone.

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?

"Delete a port forwarding rule" names the verb and resource precisely, and the clause on index/port selection separates it from set_port_forwarding and get_port_forwarding. An agent can pick this tool without consulting any 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?

Explicitly routes the agent: use index sourced from get_port_forwarding, or fall back to port, and use set_port_forwarding to re-create. It stops short of stating when not to use this tool (e.g. to disable rather than delete), but the alternative-tool pointers are concrete.

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