Skip to main content
Glama

Manage Firewall Rule

manage_firewall_rule
DestructiveIdempotent

Add, remove, enable, or disable firewall rules on MikroTik routers. Uses comment for idempotency and supports dry-run mode to validate changes without applying.

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
routerIdYesTarget router identifier from the router registry
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?

The description adds behavioral context beyond annotations: it explains the idempotency key mechanism and dry-run support. It does not contradict annotations (destructiveHint=true, idempotentHint=true). However, it could mention the confirmationToken requirement for destructive actions, which is present in the schema.

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?

The description is three sentences, front-loaded with the core function, followed by key behavioral traits (idempotency, dry-run). Zero waste, every sentence adds value.

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 the tool's complexity (17 parameters, no output schema) and thorough schema descriptions, the description covers essential concepts (idempotency, dry-run) that tie parameters together. It is complete enough for an agent to understand the tool's purpose and key parameters.

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?

With 100% schema description coverage, the baseline is 3. The description adds meaning by explaining that 'comment' is used as idempotency key and that 'dryRun' enables validation without application. This enriches understanding beyond the schema descriptions.

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?

The description states a specific verb+resource: 'Add, remove, disable, or enable a firewall rule on a MikroTik router.' It clearly distinguishes from sibling tools like list_firewall_rules and other manage_* tools by focusing on firewall rule lifecycle operations.

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?

The description mentions idempotency key for deduplication and dry-run mode, which guide usage, but it doesn't explicitly state when to use this tool versus alternatives like list_firewall_rules. It lacks explicit when-not-to-use or direct comparison, relying on implied context.

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