Skip to main content
Glama
sandbanks

Agentic_SSH

run_command

Execute shell commands on single or multiple remote hosts concurrently via SSH, with background execution and output abbreviation for token-efficient automation.

Instructions

Executes a shell command on a single host ('host') or multiple hosts concurrently ('hosts'). If using 'hosts', returns a JSON map mapping hostnames to their stdout, stderr, and exit codes. Features optional 'background' execution (starting the command and returning a local log file path immediately for async tracking), 'quiet' execution (suppressing progress logs), and output abbreviation controls. Prefer 'hosts' to execute commands across cluster nodes simultaneously.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoThe target hostname or IP address
hostsNoA list of hostname targets to query concurrently
quietNoIf true, suppresses terminal progress logging in background files (default: false)
commandYesThe shell command to run on target
max_linesNoMax lines to return if abbreviate is true (default: 100)
abbreviateNoIf true, limits long stdout output (default: true)
backgroundNoIf true, runs command in background and returns log path immediately (default: false)
progress_interval_secsNoNumber of seconds between progress reporting updates (default: 5)
Behavior4/5

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

With no annotations, the description carries the full burden of disclosing behavior. It does well by explaining the return format for hosts (JSON map with stdout, stderr, exit codes), background execution (returns log path immediately), quiet mode, and output abbreviation. It does not cover potential side effects or permissions, but for a command runner, this is reasonably transparent and much more than a minimal description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each earning its place: the first defines the core action, the second details the return format for multi-host, and the third summarizes optional features and a usage preference. No redundant or filler content; it is front-loaded with the most critical 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?

The tool is moderately complex (8 parameters, no output schema). The description covers the main behaviors: host vs. hosts, return format for hosts, background, quiet, and abbreviation. It does not explicitly state the return format for a single host, but that is inferable from the context. Given the schema's thorough field descriptions, the overall description is sufficient for an agent to select and invoke the tool correctly.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the relationship between 'host' and 'hosts' (single vs. concurrent), and the return format when 'hosts' is used—information not in the schema. It also clarifies the purpose of background mode and output abbreviation, complementing but not repeating schema fields.

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 executes a shell command on a host or hosts, using specific verbs and resources. It distinguishes itself from siblings like list_hosts and tail_log, which are for querying or following logs, not running commands. The dual mode (single vs. multiple) is explicit and immediately understandable.

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 provides clear context on when to use the tool: to run shell commands on hosts. It also gives an explicit preference: 'Prefer 'hosts' to execute commands across cluster nodes simultaneously.' This guides selection between host and hosts modes. However, it doesn't explicitly mention when NOT to use this tool or name alternative tools for similar tasks, leaving a small gap.

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/sandbanks/agentic_ssh'

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