Skip to main content
Glama

Execute a shell command over SSH

exec

Execute shell commands on remote servers via SSH, capturing stdout/stderr/exit code, with automatic blocking of dangerous operations unless confirmed.

Instructions

Runs a single shell command on the remote server over SSH and returns stdout/stderr/exit code. Use this for anything that doesn't fit one of the deploy_* recipe tools. Dangerous commands (rm -rf, reboot, mkfs, etc.) are blocked unless confirmed=true — if blocked, explain the risk to the user in plain language, get their explicit OK, then retry with confirmed: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesServer IP address or hostname, e.g. 168.119.45.12
portNoSSH port, defaults to 22
commandYesThe shell command to run, e.g. 'systemctl status nginx'
usernameYesSSH username, e.g. root or deploy
confirmedNoSet to true only after the user has explicitly approved a flagged dangerous command
passphraseNoPassphrase for the private key, if it has one
privateKeyPathYesPath to the private key on THIS machine, e.g. "~/.ssh/id_ed25519"
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: it runs a command remotely, returns stdout/stderr/exit code, and blocks dangerous commands unless confirmed=true. It also instructs how to handle blocked commands by explaining risks and getting explicit user approval.

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 efficient sentences with no wasted words. The description is front-loaded with the core action and return format, then usage guidance, then safety protocol.

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

Completeness5/5

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

Despite no output schema, the description explicitly mentions the return values (stdout/stderr/exit code). It covers when to use, dangerous command handling, and basic parameters. For a complex tool with 7 parameters, it provides sufficient context without being overly verbose.

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 coverage is 100%, so baseline is 3. The description adds value by explaining the confirmed parameter in context of dangerous commands and implying the use of host and username. It gives additional semantic meaning beyond the schema descriptions.

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 runs a single shell command over SSH and returns stdout/stderr/exit code. It distinguishes itself from sibling deploy_* recipe tools by explicitly stating to use it for anything that doesn't fit those recipes.

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?

Explicitly states when to use this tool: 'Use this for anything that doesn't fit one of the deploy_* recipe tools.' It also provides guidance on dangerous commands, explaining the blocking mechanism and how to handle it with user confirmation.

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/wellmb/DPloy'

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