Skip to main content
Glama

ssh_exec_many

Destructive

Run the same shell command on several of your servers at once and return each server's output and exit code. Use it to compare or check a fleet (disk space, versions, a service's state) in one call instead of one call per server. Up to 10 servers, run in parallel; the same time limit as ssh_exec (60 seconds by default, 'timeout' up to 300). Name the servers in 'hosts', or give 'tag' to run on every server that has those tags or groups (from hosts_list, e.g. ["distro:ubuntu", "prod"]). For long work use job_start on each server instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "ssh_exec_many"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoInstead of 'hosts': every server with all of these tags or groups (at most 10)
hostsNoServer ids (or exact names) from hosts_list
commandYesShell command to execute on each server
timeoutNoMax seconds to wait per server (default 60, at most 300)
timeoutSecondsNoSame as 'timeout' (older name).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / tag
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  ],
      +  "description": "Instead of 'hosts': every server with all of these tags or groups (at most 10)"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "hosts",
      -  "command"
      -]New value: +[
      +  "command"
      +]
  2. Changed2 schema fields changed
    • addedInput schema / properties / timeout
      Added value: +{
      +  "description": "Max seconds to wait per server (default 60, at most 300)",
      +  "type": "number"
      +}
    • changedInput schema / properties / timeoutSeconds / description
      Previous value: -"Max seconds to wait per server (default 60, at most 80)"New value: +"Same as 'timeout' (older name)."
  3. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructive and open-world behavior, and the description adds real operational context: parallelism, a 10-server cap, a 60s default with a 300s ceiling, and that per-server output plus exit codes come back. It stops short of saying how partial failures or unreachable hosts are reported, which matters for a fan-out execution tool.

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?

Front-loads the action and return value, then layers in scale limits, targeting modes, and the alternative. Every sentence carries distinct information with no restatement of the title.

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?

For a fan-out execution tool with a fully described schema and annotations covering safety, the description covers target selection, limits, timing, return contents, and the long-running alternative. It leaves a gap around error/partial-failure semantics across the up-to-10 hosts.

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 coverage is 100%, so the schema already documents hosts, tag, command, timeout, and the legacy timeoutSeconds alias, including defaults and caps. The description adds the tag value format example (["distro:ubuntu", "prod"] sourced from hosts_list) which is genuinely beyond the schema, but that is a modest increment over an already complete 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?

States a concrete verb and resource: run one shell command across several servers, returning each server's output and exit code. It explicitly contrasts with the one-server sibling (ssh_exec's time limit is referenced) and with job_start for long work, so an agent can pick it without opening a 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?

Gives a positive use case (compare or check a fleet: disk space, versions, service state) and the reason to prefer it over looping one call per server. It also names the exclusion — 'For long work use job_start on each server instead' — and explains the two targeting modes (hosts vs tag).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.