Skip to main content
Glama

ssh_execute

Execute shell commands over SSH on configured servers. Returns output, errors, and exit code. Configure working directory and timeout.

Instructions

Runs a shell command over SSH on a named configured server and returns stdout, stderr, and exit code. Mutates remote state depending on the command; not read-only. Expands command aliases before running. Uses the cwd parameter or, if omitted, the server configured default directory; adapts syntax for Linux versus Windows PowerShell targets. Timeout defaults to 120000 ms and is capped at 300000 ms. Under readonly mode destructive commands like rm or dd are refused; under restricted mode the command must match allow patterns. Output is truncated when very large.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory (optional, uses default if configured)
serverYesServer name from configuration
commandYesCommand to execute
timeoutNoCommand timeout in milliseconds (default: 120000, max: 300000)
Behavior5/5

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

No annotations provided, so description carries full burden. Discloses alias expansion, OS adaptation, timeout defaults/cap, readonly/restricted restrictions, and output truncation—comprehensive for a command 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?

Concise paragraph with no wasted sentences. Front-loaded with core purpose, each subsequent sentence adds specific behavioral detail.

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?

No output schema, but description explains return values (stdout, stderr, exit code) and covers edge cases (timeout, truncation, mode restrictions). Complete for a command execution tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3). Description adds value beyond schema by explaining cwd default behavior, timeout range, and command alias expansion, enhancing understanding of each parameter's semantics.

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?

Clearly states it runs a shell command over SSH and returns stdout, stderr, and exit code. Distinguishes from sibling tools like ssh_download or ssh_execute_group.

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?

Mentions mutability (not read-only) and behavior under readonly/restricted modes, guiding when to use and when not. Could be more explicit about alternatives but provides useful context.

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/bysonte/ssh-manager-mcp-server'

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