Skip to main content
Glama

ssh_exec

Run commands on a remote SSH server and get stdout, stderr, and exit code.

Instructions

Execute a command on a connected SSH server. Returns stdout, stderr, and exit code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the command
envNoEnvironment variables as key-value pairs
ptyNoAllocate a PTY for the command (useful for interactive commands)
commandYesCommand to execute on the remote server
sessionIdYesSession ID from ssh_connect
Behavior3/5

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

No annotations are provided, so the description carries full burden. It states the return values (stdout, stderr, exit code) but does not disclose potential side effects on the remote server, permissions context, timeout behavior, or that the command runs with the SSH user's privileges. This is adequate but not thorough.

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 a single, front-loaded sentence with no unnecessary words. It efficiently communicates the core purpose and output. Every part earns its place.

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?

Given no output schema, the description correctly notes the return format. However, it lacks information about behavioral aspects like destructiveness, timeout limits, or prerequisites (active session). For a command execution tool with many siblings, this is minimally adequate but could be improved.

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?

The input schema has 100% documentation coverage, so the baseline is 3. The description does not add any additional meaning to parameters; it only summarizes the overall function. No extra guidance on parameter usage is provided 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 explicitly states the verb 'Execute', the resource 'command on a connected SSH server', and the output 'stdout, stderr, and exit code'. It clearly distinguishes from sibling tools like ssh_connect, ssh_shell_*, and sftp_*, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description does not provide explicit guidance on when to use this tool versus alternatives. It is implied that this is for non-interactive commands, but there is no mention of prerequisites (e.g., needing an active session from ssh_connect) or when to use shell tools instead.

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

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