Skip to main content
Glama
Zw-awa

ssh-session-mcp

by Zw-awa

ssh-run

Execute shell commands in an SSH session with intelligent completion detection, safe mode blocking, and automatic async transition for long-running commands.

Instructions

Execute a command in the SSH session and return the output. Uses intelligent completion detection (prompt matching + idle timeout). In safe mode, dangerous/interactive commands are blocked. Long-running commands automatically transition to async mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idleMsNoIdle timeout in ms - if no new output for this duration, consider command done (default 2000)
waitMsNoMaximum wait time in ms (default 30000). Command may return earlier if prompt detected or idle timeout reached.
commandYesShell command to execute
sessionNoSession name or id. Defaults to "default"
maxCharsNoMax chars to read from output (default 16000). When output exceeds this limit, head (30%) and tail (70%) are returned with the middle omitted.
Behavior4/5

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

With no annotations, the description fully discloses key behaviors: intelligent completion detection, safe mode blocking dangerous commands, and automatic async for long-running commands. This provides good understanding of the tool's operation beyond a simple command execution.

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?

Three short sentences with no wasted words. Each sentence adds essential information: purpose, completion detection, safety/async. Ideal front-loading of the most important information first.

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?

Given the complexity of an SSH command execution tool with multiple parameters and no output schema, the description covers the main behaviors (completion, safety, async, truncation). It does not mention error handling or exit codes, but the core functionality is well explained.

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 covers all 5 parameters with descriptions (100% coverage). The description adds value by explaining idle timeout default behavior, maximum wait time, and the truncation scheme (head 30%, tail 70%) for maxChars, which goes 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 clearly states the tool executes a command in an SSH session and returns output. It distinguishes from siblings by mentioning intelligent completion detection, safe mode, and async mode, which sets it apart from tools like ssh-session-send or ssh-command-status.

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 implies usage for running commands and getting output, but lacks explicit guidance on when to avoid this tool in favor of alternatives (e.g., for interactive commands, use ssh-session-send). No exclusions or siblings are directly referenced.

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/Zw-awa/ssh-session-mcp'

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