Skip to main content
Glama
shigechika

io.github.shigechika/junos-mcp

by shigechika

push_config

Push configuration to a Juniper device with commit confirmed and health check for safe rollback. Supports dry run, config files, or inline set commands.

Instructions

Push configuration to a device with commit confirmed and health check.

Supports two input methods (exactly one required):

  • config_file: Path to a .set or .j2 file containing set commands

  • set_commands: List of set command strings (inline)

Safety features (not available in Juniper's official MCP server):

  • dry_run mode (default True): shows diff without committing

  • commit confirmed: auto-rollback if not confirmed within timeout

  • health check: auto-rollback on connectivity failure after commit

Commit flow (normal): lock -> load -> diff -> commit_check -> commit confirmed -> health check -> confirm -> unlock

Commit flow (no_commit=True — intentional auto-rollback): lock -> load -> diff -> commit_check -> commit confirmed -> unlock (health check and final confirm are skipped; JUNOS rolls back automatically after confirm_timeout minutes)

Args: hostname: Target device hostname (must exist in config.ini) config_file: Path to .set or .j2 file (mutually exclusive with set_commands) set_commands: List of set commands (mutually exclusive with config_file) dry_run: If True (default), show diff only without committing confirm_timeout: Minutes before auto-rollback (default 1, used with commit confirmed) no_commit: If True, issue commit confirmed but intentionally skip the final commit so JUNOS auto-rolls back after confirm_timeout minutes. Useful for triggering service restarts (e.g. syslog on EX3400) where no request ...restart command exists. dry_run=True takes precedence over no_commit (diff is shown but nothing is committed). health_check: Fallback health check commands tried in order after commit. Passes if ANY command succeeds. Supports "ping ..." (checks packets received), "uptime" (NETCONF RPC probe), or any CLI command (success if no exception). Default: ["uptime"] — uses the existing NETCONF session and does not depend on ICMP reachability. (Changed from broadcast ping in junos-mcp 0.11.0 to match junos-ops 0.16.8+.) Ignored when no_commit=True. config_path: Path to config.ini (empty string uses default search)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostnameYes
config_fileNo
set_commandsNo
dry_runNo
confirm_timeoutNo
no_commitNo
health_checkNo
config_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: safety features, dry_run, commit confirmed, health check, and the no_commit scenario. It even notes specific behavior changes (e.g., health check default changed from ping to uptime in version 0.11.0).

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 description is well-structured with a summary, bullet points for features, and a clear args list. It is fairly concise, though the commit flow description is repeated for normal and no_commit cases, adding slight redundancy.

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?

All 8 parameters are explained in detail, and the output schema exists to cover return values. The description covers commit flows, safety mechanisms, and edge cases (e.g., no_commit for service restarts), making it fully self-contained for this complex tool.

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?

Schema description coverage is 0%, but the description adds rich meaning to each parameter: mutual exclusivity of config_file and set_commands, default values, the effect of dry_run and no_commit, and health check command details. This goes well beyond raw 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?

The description clearly states 'Push configuration to a device with commit confirmed and health check,' providing a specific verb and resource. It distinguishes itself from sibling tools (e.g., get_config, get_config_diff) by detailing its unique commit flow and safety features.

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?

The description explains when to use the tool for pushing configuration and details input methods and commit flows. It lacks explicit exclusions or alternatives to sibling tools, but the context makes the usage clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shigechika/junos-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server