Skip to main content
Glama
WilliamSmithEdward

ssh-for-agents

run_command

Execute a single shell command on a remote SSH host using a configured alias, with safety checks for destructive commands and configurable timeout.

Instructions

Run one shell command on an SSH host, subject to the safety policy.

host must be an alias from list_hosts (not a raw hostname/IP). Read exit_status, stdout, and stderr from the result. The result status:

  • "ok": executed.

  • "needs_confirmation": destructive command — explain it to the user and only re-call with confirm=true after they approve; do not retry blindly.

  • "blocked": catastrophic; cannot run — use a safer approach.

  • "error": see reason (unknown host, timeout, connection failure).

Args: host: Alias of a configured host (call list_hosts to discover them). command: A single shell command to execute. confirm: Authorize a command previously flagged needs_confirmation. timeout: Per-command timeout in seconds (defaults to policy setting).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
commandYes
confirmNo
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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. It details the behavior: subject to safety policy, possible statuses (ok, needs_confirmation, blocked, error), and how to handle destructive commands. It could mention more about the safety policy, but it's adequately transparent.

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 well-structured with a main sentence, a bullet list for result status, and a numbered list for parameters. It is concise yet comprehensive, with no wasted words.

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 (4 parameters, output schema exists), the description covers all essential aspects: host source, command execution, status handling, and parameter details. It explains the output structure indirectly by mentioning exit_status, stdout, stderr, which is sufficient for an agent to use the tool correctly.

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?

The description provides rich semantics for each parameter beyond the schema: host must be an alias (not raw), command is a single shell command, confirm authorizes previously flagged commands, and timeout has a default and per-command context. With 0% schema coverage, this fully compensates.

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 'Run one shell command on an SSH host', which is a specific verb-resource pair. It distinguishes from sibling tools like check_command and list_hosts by specifying that the host parameter must be an alias from list_hosts, and outlines the output structure.

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 guidance on when to use the tool, including that host must be an alias from list_hosts, and explains the result statuses and how to handle the 'needs_confirmation' status with a confirmation flow. It lacks explicit exclusion of other cases but is sufficient.

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/WilliamSmithEdward/pySSHForAgents'

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