Skip to main content
Glama

Remove port forwarding rule

remove_port_forwarding
DestructiveIdempotent

Delete port forwarding rules by index or port, with dry-run enabled by default. Refuses ambiguous matches and protected ports.

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.

Input Schema

TableJSON 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.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, but the description adds non-obvious guard behavior: ambiguous matches and protected ports are refused, and dry_run defaults to TRUE. It does not say whether the change is immediately applied/persisted or what a success response looks like.

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?

Two sentences, no filler, with the action and selection mechanism front-loaded and the safety caveats and default in the second sentence. Every clause carries information.

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 destructive mutation with no output schema and full schema coverage, the description covers targeting, refusal conditions and the dry-run default. It leaves out the effect of a successful delete (persistence/immediacy) and required permissions, which would round it out.

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 all four parameters, setting the baseline at 3. The description adds provenance for index (it comes from get_port_forwarding) and reinforces the dry_run default, but adds nothing about protocol's tcp/udp narrowing or port/index precedence beyond what the schema states.

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 (Delete) and resource (port forwarding rule) plus the two selection keys (index or port). It is immediately distinguishable from set_port_forwarding and get_port_forwarding by naming the delete operation explicitly.

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?

Explains how to target the rule and points at get_port_forwarding as the source of a valid index, plus warns that ambiguous matches and protected ports are refused. It stops short of stating when not to use this tool or naming an alternative removal path.

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