Skip to main content
Glama

privileged-command

Destructive

Execute a single-line command with sudo elevation on a remote host through the approval gate. Use it for administrative tasks requiring root, then upload multi-line scripts via sftp-upload.

Instructions

Execute a command with sudo elevation. Goes through the approval gate; approvalPolicy on the profile decides whether that is a prompt, an automatic allow, or a refusal. The sudo password is piped via stdin for the prompt only (never visible in process list); the command itself runs with stdin at /dev/null, so it can never read the password back. Single-line only: a command containing a line break is refused, so upload a multi-line script with sftp-upload and run it by path.

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": "privileged-command"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesCommand to execute with sudo
profileNoProfile name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.31.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv2.5.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true; the description adds substantial undisclosed behavior: the approval gate and its three possible outcomes, how the sudo password is supplied (stdin, not visible in the process list), and that the command runs with stdin at /dev/null so it cannot read the password back. It also discloses the single-line hard refusal, none of which is inferable from annotations.

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?

Front-loads the purpose in the first sentence, then layers approval semantics, security mechanics, and the refusal constraint with its workaround. Every sentence carries actionable information for an agent; nothing is restated from the schema or annotations.

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

Completeness4/5

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

Very complete on invocation behavior for a privileged execution tool with two parameters. The only gap is that no output schema exists and the description says nothing about what the call returns (stdout, exit status, or error shape on refusal), which an agent would need to interpret results.

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 the baseline is 3, but the description adds real meaning: 'command' is constrained to a single line (line breaks are refused), and 'profile' is not just a name but the source of approvalPolicy that determines whether execution is prompted, allowed, or refused. That is materially more than the schema's terse 'Profile name'.

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?

States a specific verb+resource ('Execute a command with sudo elevation') and immediately distinguishes itself from plain execution siblings by the elevation requirement. It also names an alternative (sftp-upload) for the case this tool refuses, so an agent can route correctly without opening schemas.

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?

Explains that execution passes through an approval gate whose behavior is governed by the profile's approvalPolicy (prompt, auto-allow, or refusal), and gives the explicit redirect for multi-line commands to sftp-upload. It stops short of contrasting directly with run-command or destructive-command, leaving the sudo-vs-non-sudo split implicit.

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