Skip to main content
Glama
shigechika

io.github.shigechika/junos-mcp

by shigechika

run_show_command_batch

Run a CLI show command on multiple Junos devices in parallel. Filter output by grep pattern and select targets by hostnames or tags.

Instructions

Run a CLI show command on multiple devices in parallel.

Uses ThreadPoolExecutor for concurrent execution. Either hostnames or tags selects the targets; if both are omitted, every router in config.ini is targeted. When both are given, the intersection is used.

Args: command: CLI command to execute on all devices hostnames: List of target device hostnames (must exist in config.ini) tags: Tag filter. Each list element is one tag group (comma-separated tags AND together within a group). Multiple list elements OR together across groups. E.g. ["tokyo,core", "backup"] means (tokyo AND core) OR backup. Combined with hostnames the result is the intersection. grep_pattern: Optional Python re pattern. When set, only lines matching the pattern (via re.search) are kept from each host's output. Header lines (starting with #) are always preserved. Hosts with no matching lines show (no match). Reduces large batch outputs to the essential lines. This tool always fetches text output internally (there is no output_format parameter here) — grep_pattern filters plain-text lines and cannot be combined with structured JSON/XML output. max_workers: Maximum parallel threads (default 5) config_path: Path to config.ini (empty string uses default search)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
commandYes
hostnamesNo
config_pathNo
max_workersNo
grep_patternNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses ThreadPoolExecutor, concurrency, default max_workers, grep behavior (preserving headers, '(no match)' display), and that output is always text (no structured format). Lacks details on error handling or timeouts, but sufficient for typical usage.

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-structured with a brief intro followed by an Args section. Each sentence adds unique value, though length could be trimmed slightly. No redundant information.

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?

Covers all input parameters thoroughly. Output schema exists (not shown), so omission of return details is acceptable. Does not mention error scenarios or prerequisites (e.g., config.ini must exist), but overall complete for a tool with 6 parameters and no annotations.

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 has 0% description coverage; the description provides detailed explanations for all 6 parameters. Especially strong on tags (explaining AND/OR logic with example) and grep_pattern (behavior, preservation of headers). Fully compensates for missing schema descriptions.

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 the tool runs a CLI show command on multiple devices in parallel, with specific verbs ('run', 'batch') and resource ('CLI show command'). It distinguishes from siblings like run_show_command (single device) by emphasizing batch parallelism.

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?

Explicitly explains when to use hostnames vs tags, including the intersection logic when both are provided, and the fallback to all routers when omitted. Provides concrete examples for tag filtering. Could mention when not to use (e.g., for single device), but overall 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