Skip to main content
Glama

Manage Firewall Rule

manage_firewall_rule
DestructiveIdempotent

Add, remove, disable, or enable firewall rules on MikroTik routers using comment-based idempotency and dry-run mode for safe validation.

Instructions

Add, remove, disable, or enable a firewall rule on a MikroTik router. Uses comment as idempotency key for deduplication and identification. Supports dry-run mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
routerIdNoRouter ID; omit to use the default router.
tableNoFirewall table to manage: filter or natfilter
actionYesAction to perform: add, remove, disable, or enable a firewall rule
chainYesFirewall chain (e.g. forward, input, output, srcnat, dstnat)
ruleActionYesRouterOS rule action (e.g. accept, drop, reject, masquerade)
srcAddressNoSource address or network
dstAddressNoDestination address or network
protocolNoProtocol to match
srcPortNoSource port or range
dstPortNoDestination port or range
inInterfaceNoIncoming interface
outInterfaceNoOutgoing interface
commentNoComment to identify the rule (used as idempotency key)
disabledNoWhether the rule should be disabled
placeBeforeNoPlace the new rule before this rule ID
dryRunNoIf true, validate and return planned changes without applying
confirmationTokenNoToken from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action.
Behavior4/5

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

Annotations already signal destructive and idempotent behavior. The description adds valuable context: explains comment as idempotency key, confirms dry-run mode, and notes RouterOS-specific actions. No contradiction with annotations.

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

Conciseness5/5

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

Three concise sentences covering purpose, idempotency, and dry-run. No redundant words. Front-loaded with the core action and resource. Efficient and focused.

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?

Covers key behavioral aspects (idempotency, dry-run) but does not explain return values or error handling. With no output schema, the description could have specified what the tool returns (e.g., rule details, success status). Adequate for a simple CRUD tool, but a brief note on output would improve completeness.

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 100% with detailed descriptions for all 17 parameters. The description highlights two critical parameters: 'comment' (idempotency key) and 'dryRun' (dry-run mode), adding meaning beyond the schema. Other parameters rely on schema descriptions, which are adequate.

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?

Clearly states the tool manages firewall rules (add, remove, disable, enable) on MikroTik routers. Specifies key features like idempotency key via comment and dry-run support. Distinguishes from sibling tools (e.g., list_firewall_rules) by combining multiple actions in one tool.

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?

No explicit guidance on when to use this tool versus alternatives. The description implies usage for rule management but doesn't compare to similar tools like manage_mangle_rule or provide decision context. Basic usage is clear but lacks comparative or conditional advice.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AliKarami/MikroMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server