Skip to main content
Glama
riparino

@modelcontextprotocol/server-wsl

by riparino

run_privileged_command

Run bash commands with root privileges in a WSL distribution for system administration tasks requiring elevated permissions, such as installing packages or editing configuration files.

Instructions

⚠️ ELEVATED — runs as root (via wsl.exe --user root). IMPORTANT: Before calling this tool you MUST show the user the exact command that will be executed and ask for explicit confirmation. Only call it once the user has confirmed. Use this instead of sudo — do not include 'sudo' in the command string. Examples of operations that require this tool: apt install, systemctl, editing /etc files, chown/chmod on system paths, mounting filesystems.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
distroNoName of the WSL distribution. Defaults to the system default distribution.
reasonNoBrief explanation of why root access is needed, shown alongside the confirmation prompt. E.g. 'install nginx via apt' or 'edit /etc/hosts'.
commandYesThe bash command to run as root (passed to `bash -c`). Do not prefix with 'sudo' — the command already runs as root.
timeout_msNoMaximum execution time in milliseconds. Defaults to 30000 (30 seconds).
Behavior4/5

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

With no annotations, the description carries full burden. It discloses elevation, required user confirmation, and behavioral constraints (no sudo). Lacks details on error handling or reversibility, but is substantially transparent.

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

Conciseness4/5

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

Description is short and front-loaded with critical warnings and instructions. Every sentence is necessary, though examples could be separated for clarity.

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?

Given no output schema and 4 parameters with full schema descriptions, the tool description adequately covers the privileged execution context, required user interaction flow, and usage examples. Minor gap: no mention of failure behavior.

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 100%, so baseline is 3. Description adds context about command being passed to bash -c and default timeout, but minimally enhances parameter meaning beyond schema.

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 the tool runs as root via wsl.exe --user root, distinguishing it from run_command which likely runs as normal user. The verb 'runs' and resource 'root' are specific.

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

Usage Guidelines5/5

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

Explicit instructions: must show user the exact command and get confirmation before calling. Also states to use instead of sudo, and provides examples of appropriate operations (apt install, systemctl, etc.).

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/riparino/wsl-mcp'

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