Skip to main content
Glama
AIops-tools

io.github.AIops-tools/network-aiops

config_replace

Destructive

Replace a network device's full configuration with a timer-based revert, allowing rollback unless the commit is confirmed.

Instructions

[WRITE] Replace the full config and commit under a revert timer. HIGH RISK.

Same commit-confirm contract as config_merge: the device reverts after revert_in seconds unless confirm_commit follows. Verify reachability first, then confirm. Check commit.safetyNet — when no timer could be armed the change is permanent on landing.

Returns diff and a backup digest; the raw pre-change config is kept in undo.db (0600) for the recorded rollback, not echoed back here. 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 previews the diff and runs the same refusal the real commit would, so the preview can never disagree with the commit.

Args: config_text: The full replacement configuration. 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?

Adds substantial behavior beyond the annotations: the revert-timer mechanism, the commit.safetyNet field semantics, the undo.db (0600) backup retention, credential redaction with no opt-out, and the guarantee that dry_run previews cannot disagree with the real commit. These are exactly the failure-mode and side-effect details an agent needs for a destructive write.

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?

Well front-loaded with the [WRITE]/HIGH RISK tag and organized into contract, returns, and args sections. It is dense and slightly long, but nearly every clause carries behavioral information; only minor tightening is possible.

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?

Although there is no output schema, the description explains the return shape (diff and backup digest) and what is withheld (raw config in undo.db, redacted diff). Combined with the commit-confirm contract and dry_run semantics, an agent has everything needed to invoke safely.

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 schema description coverage at 0%, the description carries the full burden and does so: it explains revert_in default (300) and the special meaning of 0 (disables timer, undo becomes only rollback), dry_run's preview-plus-refusal behavior, target's source, and config_text's role as the complete replacement payload. This adds semantics well beyond 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 and resource ('Replace the full config') and immediately distinguishes scope with 'full replacement' versus the sibling config_merge, which merges. The [WRITE] tag and 'HIGH RISK' warning front-load the operation class so an agent can differentiate it from read siblings at a glance.

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 describes the commit-confirm contract, tells the agent to verify reachability first then confirm via confirm_commit, and names the alternative path (config_diff(include_secrets=True)) for verifying a literal key. It also clarifies when the change is permanent (no timer armed) versus revertible, which is real when/when-not guidance.

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