Skip to main content
Glama

server_exec

Run shell commands on a remote server over SSH, with optional working directory, timeout, and safe-mode confirmation for high-risk operations.

Instructions

Run a shell command on the server over SSH.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "server_exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoOptional remote working directory.
commandYesShell command to run.
confirmNoConfirm high-risk command in safe mode.
timeoutNoOptional timeout in seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations at all, the description bears the full burden yet only says the command runs remotely over SSH. It does not disclose that this is arbitrary command execution with real side effects, how safe-mode confirmation ('confirm') behaves, or what happens on timeout — leaving the agent unaware of the risk profile beyond what the schema's confirm field hints at.

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

Conciseness3/5

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

A single front-loaded sentence with zero wasted words, but it is undersized for a tool that executes arbitrary remote commands. Brevity here reads as under-specification rather than efficiency.

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 arbitrary-code-execution tool with no annotations and no output schema, the definition omits the risk model, execution environment, and the relationship to the sudo and session siblings. An agent could call it but would do so blind to consequences.

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?

Schema description coverage is 100%, so each parameter already documents itself, and the description adds no further meaning about cwd resolution, timeout defaults, or safe-mode semantics. Baseline 3 applies when the schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Run a shell command') plus the transport ('over SSH'), which is clearer than a bare name restatement. It does not, however, distinguish this from the close sibling server_sudo_exec, leaving the agent to infer that this is the non-privileged variant.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use or when-not-to-use guidance is given. There is no hint that dedicated siblings (server_read_file, server_list_dir, server_download) should be preferred for simple file operations, nor any mention of when to escalate to server_sudo_exec.

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