Skip to main content
Glama
aiplatforms-ru

ssh-chat-mcp

Run a command as another Linux user (sudo)

exec_as

Execute a Linux command as another user via sudo non-interactively, with optional password piped securely through stdin without logging.

Instructions

Run a command non-interactively as another Linux user via sudo -S -p '' -iu <runAs> -- bash -lc <command>. The optional sudoPassword is piped to stdin and is never returned or logged. runAs is strictly validated as a Linux username. WARNING: this performs privileged actions on the remote host.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runAsYesTarget Linux username, e.g. 'appuser'. Strictly validated.
commandYesCommand to run as the target user.
timeoutMsNo
sudoPasswordNoOptional sudo password. Piped via stdin; never logged or returned.
connectionNameYes
Behavior4/5

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

With no annotations provided, the description carries full transparency burden. It discloses that sudoPassword is piped to stdin and never logged/returned, runAs is strictly validated, and the action is privileged. The exact shell command is shown, providing clear insight into execution behavior. A minor gap is the lack of detail on error handling.

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 three concise sentences, each serving a clear purpose: stating the action, detailing a key behavioral trait, and issuing a warning. No unnecessary words or redundancy.

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

Completeness3/5

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

Given 5 parameters, no output schema, and no annotations, the description covers the essential security and execution details but omits return value format, timeout behavior, error scenarios, and prerequisites. It is adequate but not fully comprehensive.

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 coverage is 60% (descriptions for runAs, command, sudoPassword). The description repeats the schema notes for runAs and sudoPassword but adds no new information. It does not address connectionName or timeoutMs. The added value is marginal, so baseline 3 applies.

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 'Run a command as another Linux user', specifying a concrete verb and resource. It details the non-interactive nature and the sudo mechanism, which distinguishes it from sibling tools like 'exec' (likely runs as current user) and 'exec_as_start' (probably asynchronous). The warning about privileged actions further clarifies its purpose.

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 use for running commands as a different user with sudo, but does not explicitly guide when to use this tool versus alternatives like 'exec' or 'exec_as_start'. It lacks prerequisites (e.g., sudoers configuration) and does not mention when not to use it.

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/aiplatforms-ru/ssh-chat-mcp'

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