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
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| gateway | No | ||
| device_name | Yes | ||
| dst_address | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||