add_router
Add or replace a MikroTik RouterOS router connection by specifying host, transport, ports, and credentials; optionally save it and set it as default.
Instructions
Add (or replace) a router.
transport: 'api' (8728), 'api-ssl' (8729), 'rest' (v7 REST over http/www, e.g. a WebFig port) or 'rest-ssl'. port: the API/REST port if not standard. ssh_port: used by ros_cli / ros_export / file tools. save: persist to the config file (password stored there with 0600 permissions).
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": {
"name": "<name>",
"host": "<host>"
},
"name": "add_router"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| name | Yes | ||
| port | No | ||
| save | No | ||
| password | No | ||
| ssh_port | No | ||
| username | No | admin | |
| transport | No | api | |
| make_default | No |