Skip to main content
Glama

Write SwOS Blob

write_swos_blob
DestructiveIdempotent

Modify 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

NameRequiredDescriptionDefault
dryRunNoPreview the resulting blob without writing to the switch.
fieldsYesValues 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.
endpointYes'.b' endpoint to write
routerIdNoRouter ID; omit to use the default router.
confirmationTokenNoToken from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action.
includeManagementNoAllow 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.17.0
    • addedInput schema / properties / includeManagement
      Added value: +{
      +  "default": false,
      +  "description": "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.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv1.14.1
    • changedInput schema / properties / fields / description
      Previous value: -"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'); 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."New value: +"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."
  3. Addedv1.9.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructive/idempotent, and the description adds substantial context beyond them: whole-blob write semantics required by the firmware, byte-for-byte re-send of untouched fields, refusal of unexposed fields, a pre-write snapshot enabling rollback_change, and a no_change outcome. It also discloses the session-cut risk for management fields and the ip vs static_ip/addr_acq distinction, plus the firmware-schema verification flag in results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The write model and the dryRun-first instruction are front-loaded, and every sentence carries information. The final sentence is long and packs several clauses (includeManagement, static_ip/addr_acq, warning behavior) that could be split for faster scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by naming the meaningful return states (no_change, schema-verification report, management warning). Combined with the confirmationToken flow and rollback story, an agent has everything needed to invoke this destructive tool safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it clarifies that static_ip and addr_acq are stored settings that do not move the live address (ip), and restates the dryRun preview default and includeManagement consequence in behavioral terms. The merge/refusal semantics for fields also go beyond the schema's value-format notes, though some content duplicates the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Mutate a SwOS ".b" endpoint on a MikroTik switch') and immediately explains the read-merge-write mechanics, so the agent knows exactly what operation it is invoking. It does not explicitly distinguish itself from siblings like apply_swos_config or apply_plan, which keeps it just short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear operational guidance: 'dryRun defaults to true — preview first', and the includeManagement gate is explained with the condition that selects it (writes to sys.b that change reachability). It also points to rollback_change for undo and list_swos_endpoints for field names. It stops short of saying when to prefer this over the bulk config-apply siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools