Skip to main content
Glama

execute_on_group

Execute shell commands in parallel across all servers in a specified group, with controls for timeout, fail-fast, and dry-run previews.

Instructions

Execute a shell command on all servers in a group in parallel.

Concurrency is capped by the max_parallel_hosts setting (default 10; configure in [settings] of servers.toml, range 1–100).

Args: group: Group name (e.g. 'production', 'web'). Use list_groups to see available groups. command: Shell command to execute on every server in the group. timeout: Per-server command timeout in seconds. Default 30. Each server has its own timer; slow servers do NOT extend the per-server limit for others. working_dir: Absolute remote directory to cd into on each server. Uses each server's default_dir if omitted. fail_fast: If True, cancel remaining tasks as soon as any server returns a non-zero exit code or errors. Default False — run all servers to completion and report each result. force: If True, bypass the dangerous-command detection regex. Use only for audited bulk operations. Default False. dry_run: If True, do NOT connect or execute anywhere. Return a per-server preview describing what would run. Dangerous- command detection still applies. Useful for previewing fleet-wide rollouts before committing. Default False.

Returns: Formatted summary showing per-server results, success/failure counts, and aggregate exit status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
groupYes
commandYes
dry_runNo
timeoutNo
fail_fastNo
working_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: concurrency via max_parallel_hosts, per-server timeout behavior, fail_fast cancelation, force bypass of dangerous-command detection, dry_run preview, and return format. No contradiction with any missing annotations.

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?

The description is well-structured with a clear opening sentence, numbered args, and a return summary. It is slightly verbose in places (e.g., 'Each server has its own timer' could be shorter), but every sentence adds value. Overall, it's efficient and front-loaded.

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?

Given the complexity (7 parameters, parallel execution, multiple flags), the description covers all necessary aspects: concurrency settings, per-server timeout, failure modes, dangerous-command detection, dry-run preview, and return format. The presence of an output schema reduces the need for detailed return description, and the provided summary is sufficient.

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 description coverage is 0%, so the description must explain all parameters. It does so comprehensively: group (with reference to list_groups), command, timeout (with range and per-server independence), working_dir (with fallback to default_dir), fail_fast (with default behavior), force (with caution), and dry_run (with behavior description). Each adds 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?

The description clearly states the purpose: 'Execute a shell command on all servers in a group in parallel.' The verb 'Execute' and resource 'shell command on all servers' are specific. It distinguishes from siblings like 'execute' (likely single server) and 'list_groups' (discovery).

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 for when to use this tool (executing on a group) and references 'list_groups' for discovering groups. It lacks an explicit statement of when not to use it (e.g., for single server operations), but the sibling context implies that 'execute' would be appropriate then.

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

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