Skip to main content
Glama

router_undo

Destructive

Reverse a journaled router configuration change to restore prior settings, removing inserts and re-adding deletions; it refuses if the router changed since unless forced.

Instructions

Reverse a journaled change (writes restore old values, inserts are removed, removes re-added, updates swapped back). Refuses if the router changed since, unless force=true. Reboots/firmware/actions are not undoable. Dry run first like every write.

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": {
      "id": "<id>"
    },
    "name": "router_undo"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
applyNofalse (default) = dry run: show the plan, diff, warnings and risk, send nothing. true = send it.
forceNo
revealNoShow secrets (passwords/keys) unmasked.
routerNoWhich router (see router_status 'routers'); default main.main
confirm_tokenNoRequired with apply=true for CRITICAL changes: the token from the dry run (valid 5 minutes, bound to the exact plan and current router state).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructive=true and non-idempotent, and the description goes well beyond them: it spells out the exact restoration behavior per operation type, the optimistic-concurrency refusal when the router state changed, how force overrides that refusal, and which operation classes cannot be undone at all. That is precisely the risk context an agent needs before invoking a destructive rollback.

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

Conciseness5/5

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

Three dense sentences, each carrying distinct information: what is restored, when it refuses, and what is out of scope plus the dry-run convention. Nothing is repeated and the core behavior is front-loaded.

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

Completeness4/5

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

For a destructive 6-parameter tool with no output schema, the description covers behavior, refusal conditions, and scope exclusions well. It stops short of describing what a successful undo leaves behind (e.g. whether the journal entry is marked or retained) or the result of the dry-run plan, which would help an agent interpret outcomes.

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 67% and already documents apply, reveal, router, and confirm_token. The description adds the missing semantic for force (it overrides the stale-state refusal) and reinforces the dry-run-first convention for apply, which the schema only describes mechanically. It says nothing extra about id or the token lifetime beyond what the schema states.

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

Purpose5/5

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

States a specific verb and resource (reverse a journaled change) and immediately enumerates the per-operation-type semantics (writes restored, inserts removed, removes re-added, updates swapped back), so the agent knows exactly what class of change it operates on. The reference to 'journaled change' also ties it to the journal sibling conceptually without ambiguity.

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?

Gives concrete exclusions ('Reboots/firmware/actions are not undoable') and a workflow rule ('Dry run first like every write'), plus the force-bypass condition. It does not name an explicit alternative tool for non-undoable cases (e.g. a raw write/re-apply path), which keeps it short of a full when-to-use/when-not matrix.

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