Skip to main content
Glama

ssh_exec

Execute read-only or safe commands on a remote server via SSH, with destructive commands automatically blocked.

Instructions

Execute a read-only or safe command on the remote server. Destructive commands are blocked (rm, mv, chmod, systemctl, kill, firewall tools, SQL DROP/DELETE/ALTER/TRUNCATE, and similar). Use ssh_read_file to read files instead of cat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the command
commandYesCommand to execute
timeoutNoCommand timeout in milliseconds
connectionIdYesID of an active SSH connection
Behavior4/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It discloses that destructive commands are blocked with examples, which is key safety behavior. However, it does not specify what happens when a blocked command is attempted (e.g., error returned) or whether the command output is returned. This is a minor gap given the absence of annotations.

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 concise, two sentences long, and front-loaded with the primary purpose. Every sentence earns its place: the first defines the scope, the second lists blocked commands and provides an alternative for file reads. No redundancy or fluff.

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?

The tool has no output schema, so the description should ideally explain what is returned (e.g., stdout/stderr, exit code). It does not. While it covers safety and usage, it omits return-value behavior, which is a notable gap for a command execution tool. The completeness is adequate but not thorough.

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 coverage is 100%, with each parameter having a description in the input schema. The description adds no new parameter-specific semantics beyond what the schema already provides. The mention of 'Use ssh_read_file to read files instead of cat' relates to command usage but not to parameter details, so the score remains at the baseline of 3.

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: 'Execute a read-only or safe command on the remote server.' It distinguishes itself from siblings by explicitly mentioning ssh_read_file for reading files and provides a concrete list of blocked commands, making the purpose specific and unambiguous.

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

Usage Guidelines5/5

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

The description gives explicit usage context: it is for safe commands, destructive commands are blocked, and it names an alternative tool (ssh_read_file) with the directive 'Use ssh_read_file to read files instead of cat.' This clearly tells the agent when to use this tool versus a sibling.

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/mihirbhadak/SSH-MCP'

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