Skip to main content
Glama

ssh_execute

Execute shell commands on remote hosts over SSH, auto-creating connections to simplify remote device management.

Instructions

[DISABLED - set LNMCP_ENABLE_SSH_EXEC=1 to enable] Execute a command on a remote host via SSH. Will create connection if not exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesIP address or hostname
portNoSSH port (default: 22)
commandYesCommand to execute on remote host
timeoutNoCommand timeout in seconds (default: 30)
passwordNoSSH password (optional if using key or existing connection)
usernameYesSSH username
key_filenameNoPath to SSH private key file (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are present, so the description must carry the full behavioral burden. It does reveal two useful traits: the tool is disabled behind an environment variable, and it will create a connection on demand. But it omits critical behavior for a remote-execution tool: authentication handling, return/output format, connection cleanup, and the potential side effects of arbitrary commands.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and contains no filler; the disabled-state warning is operationally important. The purpose is front-loaded and the auto-connection note earns its place. It could be slightly better structured, but it is appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an SSH command-execution tool with no output schema and no annotations, the description is too sparse. It does not explain what the tool returns, how credentials are provided beyond a password field, or what security implications an agent should consider. An agent selecting and invoking this tool would be guessing about important runtime behavior.

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 schema provides descriptions for host, port, command, timeout, and password, so the description does not need to repeat those details. However, username is listed as required but missing from the properties block entirely, and the description adds no clarification for it. Overall the description adds little parameter meaning beyond what the schema already contains.

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 states a specific action ('Execute a command') on a specific resource ('a remote host via SSH'). It is clearly distinct from sibling tools like ssh_connect and ssh_disconnect, which handle connection lifecycle, and execute_local_command, which targets the local machine. The additional note about auto-creating a connection further defines its scope.

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 main use case is strongly implied: use this when you need to run a command on a remote system over SSH. The line 'Will create connection if not exists' also hints that a separate ssh_connect call may be unnecessary. However, it never explicitly names alternatives or states when this tool should not be used.

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