Skip to main content
Glama

vyos_add_source_nat_rule

Creates a VyOS source NAT (SNAT/masquerade) rule in one commit, with optional source/destination matches, protocol, translation address, and save persistence.

Instructions

Create a source NAT (SNAT/masquerade) rule in one commit.

Args: rule: Rule number. outbound_interface: Egress interface, e.g. "eth0". translation_address: "masquerade" (default) or a specific/pool address. source_address: Optional source match, e.g. "192.168.0.0/24". destination_address: Optional destination match. protocol: Optional protocol match, e.g. "tcp", "udp", "tcp_udp". 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>",
      "outbound_interface": "<outbound_interface>"
    },
    "name": "vyos_add_source_nat_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleYes
saveNo
protocolNo
descriptionNo
extra_fieldsNo
source_addressNo
outbound_interfaceYes
destination_addressNo
translation_addressNomasquerade

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two important traits: the change is applied atomically 'in one commit', and 'save: Persist after commit (default False)' warns that changes are ephemeral unless persisted. It does not say what happens on a duplicate rule number, whether an existing rule is overwritten, whether commit can fail or be rolled back, or what permissions are required.

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?

Front-loaded one-sentence summary followed by a scannable per-parameter list; nothing is wasted, and the examples are placed inline where they are needed. The Args-block style is slightly redundant with the schema property names but remains efficient.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the commit/persist behavior is covered. For a mutation tool with zero annotations, however, the description leaves rule-collision behavior, commit failure handling, and prerequisite configuration context undocumented.

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 0% with nine parameters, so the description must compensate, and it largely does: every parameter gets a line with examples ('eth0', '192.168.0.0/24', 'tcp', 'udp', 'tcp_udp'), defaults (masquerade, save False), and an explicit format for extra_fields as a {space-separated path: value} map. It does not explain the valid range or uniqueness semantics of 'rule', which is a required identifier.

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?

The opening sentence states a specific verb and resource: 'Create a source NAT (SNAT/masquerade) rule in one commit.' The word 'source' implicitly separates it from the sibling vyos_add_destination_nat_rule, though no sibling is named. An agent can determine what the tool does without opening the schema.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no named alternative such as vyos_add_destination_nat_rule or vyos_configure_batch. 'In one commit' hints that this is an atomic single-rule path, but the agent must infer when that matters versus batching or editing existing rules.

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