Skip to main content
Glama

firewall_mangle

List IPv4 mangle rules on a MikroTik RouterOS device to inspect packet marking, routing marks, chains, actions, and disabled states without changing configuration.

Instructions

List IPv4 firewall mangle rules (/ip/firewall/mangle): chain (e.g. prerouting/postrouting/forward/input/output, or a custom jump-target chain), action (e.g. mark-connection/mark-packet/ mark-routing), comment, disabled, plus whatever other fields RouterOS returns for a given rule (protocol, src/dst-address, etc - these vary per rule/action, same as firewall_filter/firewall_nat

  • not every rule has every field, and this returns each row as-is rather than assuming a fixed shape). Read-only - does not add/ modify/remove rules. See "NAT & mangle rule toggle (by comment)" below for the guarded enable_mangle_rule/disable_mangle_rule pair.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations provided, so the description carries the burden and does well: it discloses the read-only nature, the absence of a fixed row shape, and defers mutation to the guarded pair. It does not mention pagination, rate limits, or permissions, which keeps it short of 5.

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?

Front-loaded with verb+resource, but the middle parenthetical rambles about variable fields and cross-references siblings in a slightly repetitive way. It earns its length mostly, but could be tightened.

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?

Given an output schema exists, the description need not enumerate returns, yet it helpfully warns that rows vary per rule so the agent isn't surprised. Combined with the routing hint to the toggle pair, the definition is complete enough for a read-only list tool.

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?

One parameter (device_name) at 0% schema coverage; the description doesn't explain it, but the sole parameter is self-evident and the description compensates by describing the rule fields returned. Baseline for a single obvious param is acceptable at 4.

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 (List) and resource (IPv4 firewall mangle rules, with RouterOS path), and explicitly distinguishes itself from firewall_filter/firewall_nat while pointing to the enable/disable_mangle_rule pair. An agent can route correctly without opening other schemas.

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?

Explicitly marks the tool as read-only and points to the guarded toggle pair as the mutation alternative. It does not, however, say when to prefer mangle listing over, e.g., firewall_filter or firewall_nat for a given diagnostic task.

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