Skip to main content
Glama
AIops-tools

io.github.AIops-tools/network-aiops

config_merge

Destructive

Merge network device config snippets under a revert timer that auto-rolls back unless confirmed, and preview changes safely with dry_run.

Instructions

[WRITE] Merge a config snippet and commit under a device-side revert timer.

The device REVERTS the change by itself after revert_in seconds unless confirm_commit follows — so a change that severs your own management access heals without anyone having to reach the box. Verify reachability, THEN call confirm_commit. Check commit.safetyNet in the result: drivers that cannot arm a timer commit permanently and say so in commit.warning.

Returns diff and a backup digest (size + sha256). The full config is deliberately NOT returned — it carries credential hashes and PSKs — but the raw text is retained in undo.db for the recorded rollback. The diff is credential-redacted with no opt-out (see the redaction block); use config_diff(include_secrets=True) first if you must verify a literal key.

dry_run=True stages the candidate, returns the diff, discards it, and runs the SAME refusal the real commit would — so a green preview is never followed by a refusal.

Args: config_text: The configuration snippet to merge. revert_in: Device-side revert timer in seconds (default 300). 0 disables it, leaving the recorded undo as the only rollback path. dry_run: If True, preview the diff + safety assessment without committing. target: Device name from config.

Input Schema

NameRequiredDescriptionDefault
targetNo
dry_runNo
revert_inNo
config_textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only give destructiveHint=true; the description goes far beyond by disclosing the device-side auto-revert unless confirm_commit follows, the commit.safetyNet/commit.warning signal for drivers that cannot arm a timer, credential redaction with no opt-out, and that the full config is withheld but retained in undo.db. These are exactly the behaviors an agent cannot infer from structured fields.

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] marker and revert-timer constraint are front-loaded and each paragraph earns its place by covering behavior, return values, and args. It is dense and slightly long, but no sentence is filler.

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?

For a destructive 4-param tool with no output schema, the description still explains the return payload (diff, backup digest with size+sha256, commit.safetyNet, commit.warning) and the whole confirm/rollback lifecycle. Nothing an agent needs to call or reason about the result is missing.

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

Parameters5/5

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

With 0% schema coverage, the description carries the full burden and does: revert_in default 300 and the non-obvious '0 disables it, leaving the recorded undo as the only rollback path', dry_run's preview+discard semantics, target as a device name from config, and config_text as the snippet. This adds meaning well past the bare schema types.

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+resource ('Merge a config snippet') plus the distinctive revert-timer commit model, which no sibling (config_replace, config_backup) shares. An agent can identify this as the safety-netted staged commit path without opening the schema.

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

Usage Guidelines5/5

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

Explicitly prescribes the workflow: 'Verify reachability, THEN call confirm_commit', and routes to config_diff(include_secrets=True) when a literal key must be verified. It also explains when to use dry_run and what it guarantees, so alternatives and conditions are both covered.

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