Skip to main content
Glama

ssh_exec

Runs allow-listed shell commands on a preset SSH host, returning stdout, stderr, and exit code while enforcing approval prompts and audit logging.

Instructions

Run a shell command on the preset's SSH host. The command must match one of the preset's allowed_commands regexes (anchored ^...$). Returns stdout, stderr, and exit_code. Key-based auth only; host key is verified against the user's known_hosts file. Sensitive presets trigger the approval prompt. If the user previously approved a time-boxed window for this preset+action, the call proceeds without a new prompt and is recorded as 'windowed' in the audit log. Every call is recorded to the audit log.

Input Schema

NameRequiredDescriptionDefault
commandYes
preset_nameYes

Output Schema

NameRequiredDescriptionDefault
stderrYes
stdoutYes
exit_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so well: it discloses key-based auth only, known_hosts verification, approval prompts for sensitive presets, time-boxed approval windows, and audit logging. It also specifies return fields (stdout, stderr, exit_code), making the tool's behavior very clear.

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 front-loaded with the core action and then layers constraints, return values, auth, approval, and audit behavior without wasted wording. Every sentence adds operational information an agent needs.

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?

For a complex remote command execution tool with no annotations and 0% schema description coverage, the description is quite complete: it covers auth, host verification, approval, audit logging, command restrictions, and return values. It still lacks details such as command timeout behavior or how presets are discovered, but the core invocation context is well covered.

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 description coverage is 0%, so the description must compensate for both parameters. It meaningfully defines `command` as a shell command subject to anchored `allowed_commands` regexes and establishes that `preset_name` selects the SSH host, allowed commands, and approval context, though it does not explain how to discover preset names.

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 gives a specific verb and resource: 'Run a shell command on the preset's SSH host.' It clearly distinguishes this tool from siblings such as db_query, sftp_transfer, and proxy_http by naming shell execution over SSH as the action.

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 gives preconditions such as the command matching `allowed_commands` regexes and key-based auth, which implies when the tool can run. However, it does not explicitly compare this tool with siblings like sftp_transfer or proxy_http or state when to choose an alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.