update_route
Modify an existing MikroTik route by ID to change its gateway, destination, distance, routing table, VRF, or disabled state. Use it to correct or adjust routing behavior on a RouterOS device.
Instructions
Updates a route.
Notes: route_id: "*N" or "N" from list output e.g. "*3" dst_address: CIDR e.g. "192.168.1.0/24" check_gateway: "ping" or "arp" distance: 1-255 routing_table: name of a table from /routing table; "" moves the route back to "main", since every RouterOS 7 route belongs to a table. Pass "" to vrf_interface or pref_src to clear them.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"route_id": "<route_id>"
},
"name": "update_route"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | ||
| device | No | ||
| comment | No | ||
| gateway | No | ||
| disabled | No | ||
| distance | No | ||
| pref_src | No | ||
| route_id | Yes | ||
| dst_address | No | ||
| target_scope | No | ||
| check_gateway | No | ||
| routing_table | No | ||
| vrf_interface | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |