Skip to main content
Glama

ssh_execute

Execute shell commands on a remote Linux machine via SSH. Returns stdout, stderr, and exit code.

Instructions

Execute a shell command on the remote Linux machine.

Returns stdout, stderr, and exit code. Output is truncated if too large.

Args: command: Shell command to execute (e.g., 'ls -la /var/log') session_name: SSH session to use (default: 'default') timeout: Command timeout in seconds (default: 30, max: 300)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
timeoutNo
session_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses output truncation, timeout defaults and maximum, and return values (stdout, stderr, exit code). Without annotations, this provides sufficient behavioral context. Could mention that command is run in the default shell and is blocking.

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 yet comprehensive. Uses clear sections (Args) and sentences are to the point. No redundant or verbose language.

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?

Covers parameters, behavior, and outputs. With an output schema present, return value explanation is sufficient. Minor gap: does not explain what 'session_name' refers to (preexisting SSH connection).

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?

Adds meaningful details beyond raw schema: provides example for command, explains session_name default, and specifies timeout range (default 30, max 300). Schema description coverage is 0%, so this extra context is valuable.

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 executes a shell command on a remote Linux machine and returns stdout/stderr/exit code. Distinguished from siblings like ssh_execute_background and ssh_execute_script by focusing on foreground execution.

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?

Implies usage for running immediate shell commands but does not explicitly specify when to use vs alternatives or provide any prerequisites or conditions. No 'when-not-to-use' guidance.

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

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