Skip to main content
Glama

vyos_add_firewall_rule

Create or update a VyOS firewall filter rule in one commit with action and protocol-dependent fields to enforce IPv4/IPv6 input, forward, or output policy.

Instructions

Create or update a firewall filter rule in a single commit.

The action is always included so the rule validates. Protocol-dependent fields (destination/source port) require 'protocol' to be present in fields.

Args: rule: Rule number (lower numbers are evaluated first). action: "accept", "drop", "reject", "jump", "return", "continue". family: "ipv4" or "ipv6". hook: "forward", "input" or "output". fields: Map of rule setting to value, space-separated keys for nested nodes. Examples: {"protocol": "tcp", "destination port": "443", "state established": "enable"} {"source address": "192.0.2.0/24", "destination group address-group WEB": ""} {"log": "enable"} description: Optional rule 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>",
      "action": "<action>"
    },
    "name": "vyos_add_firewall_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
hookNoforward
ruleYes
saveNo
actionYes
familyNoipv4
fieldsNo
descriptionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 useful traits: the action is always injected so the rule validates, ordering is by rule number (lower evaluated first), and `save` persists after commit with a default of False. It does not explain what happens when the rule number already exists (silent overwrite vs merge), whether the commit is confirmed/rolled back, or what permissions are needed for a config mutation.

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 lead sentence states the operation and the key commit semantics up front, followed by a parameter block that is easy to scan. Slightly verbose in docstring style, but every line carries information; no 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?

For a 7-parameter mutation tool with an output schema (so returns need no explanation), the description covers parameters, validation constraints, ordering, and persistence. The remaining hole is mutation safety — no statement that an existing rule with the same number is overwritten, and no note on commit confirmation or rollback.

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 coverage is 0%, yet the description documents all seven parameters, enumerates the valid `action`, `family` and `hook` values (enums the schema lacks entirely), and explains the non-obvious `fields` map with three concrete examples of space-separated nested-node keys. This is exactly the meaning the schema does not provide.

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 description opens with a specific verb and resource: 'Create or update a firewall filter rule in a single commit.' That is enough to distinguish it from delete/list firewall siblings by implication, but it never names a sibling (e.g. vyos_list_firewall_rules or vyos_delete_firewall_rule) to make the boundary explicit.

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?

It gives a real precondition — protocol-dependent fields (destination/source port) require 'protocol' in `fields` — which is actionable usage guidance. However, there is no statement of when to use this versus vyos_configure_batch, vyos_list_firewall_rules, or vyos_set_firewall_default_action, and no guidance on when create-vs-update applies.

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