Skip to main content
Glama

remove_route

Remove a static route by dst_address, narrowed by gateway. Refuses dynamic routes; preview first with confirm=False.

Instructions

Remove a static route (/ip/route remove), resolved by dst_address - narrowed by gateway when more than one route shares that dst_address. Errors clearly if nothing matches, or if the match is still ambiguous after narrowing.

SAFETY: refuses outright (raises an error, does not remove anything) if the resolved route is dynamic (dynamic=true - a connected/DHCP/OSPF/BGP-installed route). Only static, admin-created routes can be removed by this tool - removing a device's connected/dynamic route can sever the network.

The returned preview's warning field is non-null (but not blocking) whenever the resolved route's dst_address is the default route (0.0.0.0/0/::/0) - check it before calling again with confirm=true.

WRITE tool, guarded: blocked entirely unless the server is running with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the default) to get a before/after preview (including the warning field) without changing anything; call again with confirm=True to actually apply it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNo
gatewayNo
device_nameYes
dst_addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the write-guard env flag, the dry-run preview semantics, the non-blocking `warning` field on default-route removal, and the hard refusal on dynamic routes with the reason (network severance). These are precisely the behavioral traits an agent needs to avoid a destructive mistake.

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?

Front-loads the purpose and resolution logic, then uses labeled SAFETY and WRITE sections, so a reader can locate the destructive-operation constraints immediately. The length is justified by the guarded-write complexity and no sentence is 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 mutation tool with no annotations, an output schema (so return values need not be explained), and a guarded write flow, the description covers the safety and confirm semantics thoroughly. The only gap is the unexplained `device_name` parameter, which is a minor omission.

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%, so the description must compensate, and it explains `dst_address` (resolution key), `gateway` (narrowing only when multiple routes share a dst_address), and `confirm` (preview vs apply) clearly. However, `device_name` is never mentioned, leaving one of four parameters undocumented.

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 and resource ('Remove a static route'), gives the resolution key (`dst_address`) and the narrower (`gateway`), and even cites the underlying RouterOS command. An agent can distinguish it from siblings like add_route, enable_route, disable_route and remove_ipv6_route without opening any schema.

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

Usage Guidelines5/5

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

Explicitly states when it refuses (dynamic/connected/DHCP/OSPF/BGP routes), when it is blocked entirely (no MIKROTIK_ALLOW_WRITE), and the two-step workflow (confirm=False preview then confirm=True apply). Error-on-no-match and error-on-ambiguity conditions are also spelled out, leaving little to inference.

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