Skip to main content
Glama

Get network port forwards

get_network_port_forwards
Read-onlyIdempotent

Read the NAT port forwarding rules of an owned private network: applied rules, router generation, state, exposure and targets. Use it to inspect or prepare changes before setting forwards.

Instructions

Read the NAT port forwarding rules of an owned private network: applied rules (protocol, external_port on the network's NAT public address, the target server's private_port_id and its internal_port), the router generation to send to set_network_port_forwards (not the network generation), state (empty, pending, active, failed), per-rule exposure (open_to_internet is true when the server's security groups admit that port from every IPv4 address), targets with eligible, unavailable_reason_code, kind (private_primary = a server without its own public IPv4, own_ipv4 = the private interface of a server that has one) and reply_route (own_ipv4 only), capability (available, limit, protocols), last_change (a refused change with its nat_port_forward_refused_* reason_code) and suspended (rules kept while the network has no NAT address; they are on no router). active is the router's committed state, not a packet test. The network needs its NAT public address (see get_network_routed_egress); capability.available false means new rules are not accepted for this account now, rules already there can still be removed. Requires explicit networking:read for reads or networking:manage for changes; full/read defaults do not grant networking. The backend enforces ownership, feature availability and service 2FA locks.

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": {
      "network_id": "<network_id>"
    },
    "name": "get_network_port_forwards"
  }
}

Input Schema

NameRequiredDescriptionDefault
network_idYesExact lowercase UUID returned by an owned networking resource

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.3.21

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds material context beyond them: explicit networking:read vs networking:manage scopes that "full/read defaults do not grant," backend ownership and feature-availability enforcement, service 2FA locks, and the caveat that "active is the router's committed state, not a packet test." It also explains the suspended state (rules kept while the network has no NAT address, on no router), which an agent cannot infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is a single very long run-on sentence that chains return-field enumerations (exposure, targets, capability, last_change, suspended) without paragraph or list structure, making it hard to scan. Nearly all the content is substantive, so the issue is density and parseability rather than filler.

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?

With no output schema, the description carries the return-value burden and does so thoroughly, enumerating applied rules, state values, target kinds, capability fields, and last_change reason codes. It is close to complete for a single-network read; only response envelope/pagination details are left unstated.

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?

There is a single parameter with 100% schema description coverage, so the schema already documents network_id as an exact lowercase UUID. The description adds no syntax or sourcing detail for the parameter itself (the NAT-address prerequisite is a precondition on the network, not on the argument), so this sits at the baseline.

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?

Opens with a specific verb+resource+scope: "Read the NAT port forwarding rules of an owned private network." It also distinguishes itself from the mutation sibling by naming set_network_port_forwards and clarifying which router generation that tool expects, so an agent can tell the read from the write without opening either 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?

Gives a concrete prerequisite ("The network needs its NAT public address (see get_network_routed_egress)") and routes the agent to a sibling for that value, plus states that capability.available=false still allows removal of existing rules. It stops short of an explicit when-to-use-this-vs-that statement against set_network_port_forwards, leaving the read/write split implied rather than spelled out.

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

Deploy Server

Other Tools