Write SwOS Blob
write_swos_blobModify MikroTik SwOS .b endpoint settings by merging supplied fields into the complete blob, previewing changes with dryRun by default, then writing the whole blob back.
Instructions
Mutate a SwOS '.b' endpoint on a MikroTik switch. The full endpoint blob is read, the given fields are merged in, and the entire blob is written back (the firmware only accepts whole-blob writes); untouched fields are re-sent byte-for-byte, and a field this firmware does not expose is refused rather than injected. dryRun defaults to true — preview first. Every result reports whether the schema has been verified against the switch's firmware. The pre-write blob is snapshotted, so the change can be undone with rollback_change. Returns no_change when the values already match. A real write to sys.b that changes how the switch is reached (ip, static_ip, addr_acq, allow_from_*) is refused unless includeManagement is true, since it can cut this session; static_ip and addr_acq are stored settings that do not move the live address (ip) by themselves, and the result warns about both.
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": {
"endpoint": "<endpoint>",
"fields": "<fields>"
},
"name": "write_swos_blob"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Preview the resulting blob without writing to the switch. | |
| fields | Yes | Values to set, keyed by decoded field name (from list_swos_endpoints) or by a raw wire key already present in the blob — anything else is rejected. Option fields take the enum name (e.g. 'auto'); IP fields take a dotted quad (192.168.88.1) and MAC fields six hex pairs (64:d1:54:00:00:01); other text becomes a UTF-8 hex string; numbers and '0x...' strings are written as hex, padded to the width of the value they replace. A per-port field given a single value applies it to EVERY port. | |
| endpoint | Yes | '.b' endpoint to write | |
| 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. | |
| includeManagement | No | Allow a real write to sys.b that changes how the switch is reached: the live address (ip), static_ip, addr_acq or an allow_from_* setting. Refused unless true, because it can cut the session that makes the write; a dry run previews it without. |