Skip to main content
Glama
sondt2709
by sondt2709

execute_ssh_command

Execute shell commands on remote hosts over SSH, returning output, exit code, and log file path for system management and troubleshooting.

Instructions

Run a shell command on a remote host over SSH.

Args:
    hostname: Host alias from SSH config.
    command: Shell command to run.
    timeout: Connection/command timeout, seconds (default 30, max 300).
    max_length: Max stdout/stderr length in the response (default 1000, max 10,000,000); full output is in the log file.

Returns:
    Command output (markdown), with exit code and the log file path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
timeoutNo
hostnameYes
max_lengthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/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 usefully discloses timeout bounds, output truncation via max_length, the fact that full output goes to a log file, and the return format. However, it does not mention authentication requirements, potential side effects of running arbitrary commands, or safety/security caveats.

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 front-loaded with a clear one-sentence purpose, followed by a compact Args list and Returns section. Every sentence adds useful information, with no filler or redundant content.

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?

The description provides strong coverage of parameters, defaults, return values, and truncation behavior. However, it omits any guidance about long-running or destructive commands, authentication assumptions, or remote-host impact, which would be helpful for a tool that executes arbitrary commands with no annotation safeguards.

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 input schema has no parameter descriptions (0% coverage), so the description fully compensates by explaining each parameter: hostname as an SSH config alias, command as the shell command, timeout with defaults/max, and max_length with truncation and log-file behavior. This is exactly what the agent needs to invoke the tool correctly.

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 tool's function: 'Run a shell command on a remote host over SSH.' The verb 'Run' and resource 'shell command on a remote host' are specific, and the description distinguishes this from sibling tools that list hosts, get host info, or test connections.

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 one-line summary provides clear context for when to use the tool: when you need to execute a shell command on a remote host. It does not explicitly mention alternatives or exclusions, but the purpose is distinct enough that no confusion with sibling tools arises.

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

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