Skip to main content
Glama

vyos_add_destination_nat_rule

Creates a VyOS destination NAT (DNAT) port-forward rule in one commit, mapping inbound traffic and optional ports to an internal host; set protocol when specifying ports.

Instructions

Create a destination NAT (DNAT / port-forward) rule in one commit.

The translation address is always included so the rule validates. If you specify a port, also specify protocol (tcp/udp).

Args: rule: Rule number. inbound_interface: Ingress interface, e.g. "eth0". translation_address: Internal host to forward to, e.g. "192.168.1.10". translation_port: Optional internal port. destination_port: Optional matched external port. protocol: Protocol, e.g. "tcp", "udp", "tcp_udp" (required if a port is set). destination_address: Optional external/matched destination address. extra_fields: Additional {space-separated path: value} settings. description: Optional description. save: Persist after commit (default False).

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": {
      "rule": "<rule>",
      "inbound_interface": "<inbound_interface>",
      "translation_address": "<translation_address>"
    },
    "name": "vyos_add_destination_nat_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleYes
saveNo
protocolNo
descriptionNo
extra_fieldsNo
destination_portNo
translation_portNo
inbound_interfaceYes
destination_addressNo
translation_addressYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does add useful context: the operation happens 'in one commit', the translation address is always included 'so the rule validates', and save controls post-commit persistence. However, it is silent on whether the commit is auto-confirmed or needs vyos_confirm_commit, what happens if the rule number already exists, and whether failures roll back.

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?

The summary and validation constraints are front-loaded before the Args block, and each line earns its place by documenting an otherwise bare parameter. The Args list is a standard, scannable format; only the duplicated 'Optional' markers add slight redundancy.

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 10-parameter mutation tool with no annotations, the definition covers purpose, parameter semantics, and the port/protocol dependency well; an output schema exists so return values need no explanation. What remains missing is commit-confirmation/failure behavior and conflict handling for an existing rule number — meaningful gaps for a config-changing tool.

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

Parameters5/5

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

Schema description coverage is 0% and all ten parameter titles are bare, yet the description supplies per-parameter meaning, formats, and examples (inbound_interface 'eth0', translation_address '192.168.1.10', protocol values 'tcp'/'udp'/'tcp_udp', extra_fields as {space-separated path: value}). It also explains the destination_port vs translation_port distinction and the conditional requirement linking ports to protocol, which the schema nowhere encodes.

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 — 'Create a destination NAT (DNAT / port-forward) rule' — which is immediately distinguishable from the sibling vyos_add_source_nat_rule by the destination/source qualifier, plus the port-forward synonym disambiguates the networking concept. The 'in one commit' clause further scopes it to a single atomic write.

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 context is implied rather than stated: the tool creates DNAT rules, and the description gives one conditional constraint ('If you specify a port, also specify protocol'). It never names vyos_add_source_nat_rule, vyos_configure_batch, or vyos_delete_nat_rule as alternatives, nor does it say when-not to use it or what prerequisite session state is needed.

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