Skip to main content
Glama

host_exec

Run arbitrary shell commands across Linux hosts over SSH, using sudo when configured. Each rollout starts as a dry run and applies the confirmed plan one host at a time.

Instructions

Run an arbitrary shell command on hosts (bash, through sudo when configured). For anything the dedicated tools do not cover. Output tail per host; the journal keeps the command. Parallel by default (batch 10).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNofalse (default) = dry run: show what will happen on which hosts and a planHash. true = run it; needs planHash
batchNohosts at a time (rolling). Default depends on the action: 1 for disruptive ones
asUserNorun as the ssh user instead of root
targetNohosts: all | <host> | <glob nl-*> | <group> | role:<edge|remnanode|panel|docker> | tag:<tag>; comma-separated, !x excludesall
commandYes
planHashNoplanHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since
timeoutSecNo
continueOnErrorNokeep going after a host fails (default: stop the rollout at the first failure)
skipUnreachableNoskip hosts that do not answer over ssh instead of refusing the whole plan (they show as skipped)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With zero annotations the description carries the full burden, and it does add real traits: sudo escalation, parallel execution (batch 10), per-host output tails, and journaling of the command. It stops short of the safety profile an arbitrary-execution tool needs - blast radius, default root execution, irreversibility - so the disclosure is partial rather than complete.

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?

Four short sentences with the core capability front-loaded and no filler; every clause carries information. Slightly under-elaborated rather than bloated, so it is efficient but not maximally informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter, annotation-free, arbitrary-command tool with no output schema, the description covers execution mode, output shape, and audit trail, but leaves safety framing and the dry-run/apply lifecycle entirely to the schema. Adequate, with a meaningful gap for such a high-risk tool.

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 78%, so the schema already documents most parameters thoroughly (planHash, timeoutSec, target grammar). The description adds only marginal semantics - 'Parallel by default (batch 10)' and 'through sudo when configured' - which lightly reinforce batch and asUser but do not extend the schema's own text.

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 specific verb+resource ('Run an arbitrary shell command on hosts') and immediately positions it relative to siblings with 'For anything the dedicated tools do not cover', so an agent can tell it apart from host_inspect, host_logs, host_file_edit, etc. 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly gives the usage condition: a fallback for gaps the dedicated tools leave. However it names no concrete alternatives and no when-not conditions (e.g. don't use for file edits, service restarts), leaving the agent to infer the routing.

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