Manage Script
manage_scriptAdd, update, or remove RouterOS scripts with idempotency by name. Validate changes via dry-run before applying.
Instructions
Add, update, or remove a RouterOS script. Idempotent by name. add throws CONFLICT if the name already exists; update throws NOT_FOUND if it does not. Supports dry-run.
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": {
"action": "<action>",
"name": "<name>"
},
"name": "manage_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Script name — idempotency key | |
| action | Yes | Action to perform | |
| dryRun | No | Preview changes without applying. | |
| source | No | Script body (required for add and update) | |
| comment | No | Optional comment | |
| routerId | No | Router ID; omit to use the default router. | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. | |
| dontRequirePermissions | No | Allow script to run without elevated permissions |