Skip to main content
Glama
faizbawa

mcp-remote-ssh

ssh_sudo_execute

Execute shell commands with sudo on a remote host using an existing SSH session, with optional sudo password for elevated privileges.

Instructions

Execute a command with sudo on the remote host. If the user already has passwordless sudo, leave sudo_password empty.

Args: session_id: The session ID returned by ssh_connect. command: Shell command to execute under sudo. sudo_password: Password for sudo prompt (empty for passwordless sudo). timeout: Maximum seconds to wait (default: 120).

Returns: Dict with stdout, stderr, and exit_code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
commandYes
sudo_passwordNo
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Without any annotations, the description transparently explains the tool's behavior: executing commands with sudo, requiring a session_id from ssh_connect, and outlining parameters and return values. It does not hide any inherent risks, though it could mention potential destructive impacts of commands, but it's not misleading.

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 concise and well-structured: a brief purpose sentence, a conditional note about passwordless sudo, an Args list, and Returns. Every sentence adds value without redundancy.

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?

Given the tool's complexity (4 parameters, output schema, part of a suite), the description covers all necessary information: parameter semantics, return structure, prerequisite session_id, and default timeout. The agent can confidently invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description's Args section provides meaningful explanations for all four parameters: session_id, command, sudo_password, and timeout. This adds critical context beyond the schema's type and default values, enabling correct invocation.

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 'Execute a command with sudo on the remote host' with a specific verb (execute) and resource (command with sudo on remote host). It effectively distinguishes this from the sibling ssh_execute tool by specifying sudo involvement.

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

Usage Guidelines4/5

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

The description includes guidance on when to leave sudo_password empty for passwordless sudo, which is useful. While it does not explicitly contrast with sibling tools like ssh_execute, the purpose implies usage when sudo privileges are needed, which is sufficient for an agent.

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/faizbawa/mcp-remote-ssh'

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