Skip to main content
Glama

ssh_multi_exec

Run a command on multiple remote hosts simultaneously and get results per host, reducing repeated SSH calls. Ideal for applying the same operation across servers in one step.

Instructions

Execute a command on multiple remote hosts in parallel. Returns results per host. Use this instead of calling ssh_exec multiple times — it's faster and shows results side by side. Subject to SSH_MCP_COMMAND_WHITELIST / SSH_MCP_COMMAND_BLACKLIST if configured (policy is checked once before fan-out).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoSSH port (default: 22)
hostsYesList of SSH hostnames or IPs
commandYesShell command to execute on all hosts
timeoutNoCommand timeout in milliseconds (default: 30000)
usernameNoSSH username (default: current user)
credential_idNoAlias of an SSH password configured only on the MCP server (for example, ssh1 resolves to SSH_CREDENTIAL_SSH1). Never pass a real password here.
privateKeyPathNoPath to SSH private key
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It transparently surfaces parallel execution, the policy whitelist/blacklist check performed once, and the command execution nature. It does not warn about potential destructive side effects of the executed command itself, but this is inherent to a command execution tool and somewhat self-evident; the policy note is a valuable disclosure.

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?

Three concise sentences, each earning its place: the purpose, the usage guidance, and the policy caveat. Information is front-loaded and easily scannable with no redundancy or filler.

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?

With 7 parameters fully documented in the schema and no output schema present, the description covers the essential decision points: what it does, when to use it over the alternative, and the policy constraint. Could elaborate on result structure, but 'results per host' suffices for a command fan-out tool. Comprehensive enough for selection and invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameters are already well-documented in the JSON schema. The tool description adds no additional parameter semantics beyond restating the command and hosts concepts. Per guidelines, this lands at the baseline of 3.

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 uses specific verb 'Execute' with resource 'command on multiple remote hosts in parallel', clearly distinguishing from sibling ssh_exec that targets a single host. The alternative is explicitly named once, resolving ambiguity without opening the schema.

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 instructs to use this tool 'instead of calling ssh_exec multiple times,' and gives a concrete rationale (faster, side-by-side results). This directly aids tool selection among the large sibling set.

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/txcxgzs/ssh-mcp'

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