Skip to main content
Glama

ssh

Execute batch SSH operations on GNS3 network nodes. Configure sessions, run commands, and disconnect, with support for local execution to test connectivity before device access.

Instructions

Execute SSH operations (BATCH-ONLY)

v0.47.0: Batch-only SSH tool. Individual SSH tools removed (aggressive consolidation). v0.28.0: Local execution support with node_name="@"

Local Execution Support:

  • Use node_name="@" in any operation for local execution on SSH proxy container

  • Mix local and remote operations in same batch

  • Useful for: connectivity tests before device access, ansible playbooks

SSH Proxy Services (v0.3.0):

  • TFTP Server: Available on port 69/udp at /opt/gns3-ssh-proxy/tftp (use tftp tool)

  • HTTP/HTTPS Reverse Proxy: Access device web UIs at http://proxy:8023/http-proxy/:/

  • HTTP Client Tool: Make GET requests to device APIs (use http_client tool)

Two-phase execution prevents partial failures:

  1. VALIDATE ALL operations (check required params, valid types)

  2. EXECUTE ALL operations (only if all valid, sequential execution)

Supported operation types:

  • "configure": Configure SSH session (equivalent to old ssh_configure)

  • "command": Execute command (equivalent to old ssh_command, supports local with "@")

  • "disconnect": Disconnect SSH session

Args: operations: List of operation dicts, each with: - type (str): Operation type (required) - node_name (str): Node name (or "@" for local execution) (required) - Additional params specific to operation type

Returns: JSON with execution results including completed/failed indices

Examples: # Configure session + run commands: >>> ssh(operations=[ ... {"type": "configure", "node_name": "R1", "device_dict": { ... "device_type": "cisco_ios", "host": "10.1.0.1", ... "username": "admin", "password": "cisco123" ... }}, ... {"type": "command", "node_name": "R1", "command": "show version"}, ... {"type": "command", "node_name": "R1", "command": "show ip route"} ... ])

# Same command on multiple nodes:
>>> ssh(operations=[
...     {"type": "command", "node_name": "R1", "command": "show ip int brief"},
...     {"type": "command", "node_name": "R2", "command": "show ip int brief"}
... ])

# Configuration commands:
>>> ssh(operations=[{
...     "type": "command",
...     "node_name": "R1",
...     "command": [
...         "interface GigabitEthernet0/0",
...         "ip address 10.1.1.1 255.255.255.0",
...         "no shutdown"
...     ]
... }])

# Local execution - test connectivity before device access:
>>> ssh(operations=[
...     {"type": "command", "node_name": "@", "command": "ping -c 2 10.1.1.1"},
...     {"type": "command", "node_name": "@", "command": "ping -c 2 10.1.1.2"},
...     {"type": "command", "node_name": "R1", "command": "show ip int brief"},
...     {"type": "command", "node_name": "R2", "command": "show ip int brief"}
... ])

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYesList of SSH operations (command/disconnect)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses two-phase execution (validate then execute), sequential processing, and batch-only constraint. Lacks explicit safety warnings about destructive commands, but the examples imply configuration changes. No annotations were provided, so description carries full burden.

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 sections and enumerated examples, but includes some extraneous details (e.g., TFTP server path) that could be delegated to sibling tool descriptions. Overall effective despite length.

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?

Covers operation types, two-phase execution, local execution, proxy services, and return format. Given the tool's complexity and presence of an output schema, the description is thorough and leaves no critical gaps.

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?

Input schema only lists operations array with minimal description. The description adds detailed structure for each operation dict (type, node_name, additional params), operation types, and multiple examples, providing comprehensive meaning beyond the schema.

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?

Description clearly states tool executes SSH operations in batch mode, enumerates operation types (configure, command, disconnect), and distinguishes from siblings like tftp and http_client.

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 marks tool as batch-only, explains local execution use cases, and provides examples that mix local and remote operations. Alternatives like tftp and http_client are referenced for non-SSH tasks.

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/ChistokhinSV/gns3-mcp'

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