Skip to main content
Glama

privileged-command

Destructive

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.

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.

Input Schema

NameRequiredDescriptionDefault
commandYesCommand to execute with sudo
profileNoProfile name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.5.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true, so the description carries the behavioral burden and does it well: it discloses the approval gate and the profile-driven policy, the stdin handling for the password versus /dev/null for the command (so the password cannot be read back), and the single-line refusal rule. These are non-obvious constraints an agent needs before calling.

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?

Four sentences, each earning its place: purpose, gate behavior, security mechanics, and the single-line constraint with a concrete workaround. The primary operation is front-loaded.

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?

For a sudo-execution tool with no output schema and full param documentation, the description covers the safety-relevant mechanics an agent needs to call it correctly, including failure modes (refusal on line breaks) and the alternative path for scripts.

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 to the 'profile' parameter by tying it to approvalPolicy behavior. The 'command' constraint (single-line only, no line breaks) also adds semantics beyond the schema's 'Command to execute with sudo'.

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: 'Execute a command with sudo elevation', which is clearly distinct from the plain run-command sibling by the elevation qualifier. It does not explicitly name run-command as the non-elevated alternative, but the sudo framing makes the difference inferable.

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 the approval-gate behavior (prompt, automatic allow, or refusal) that governs whether the call proceeds, and explicitly routes multi-line scripts to sftp-upload plus execution by path. It lacks an explicit contrast with run-command for non-sudo execution, but the conditions for use are clear.

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