Skip to main content
Glama
riparino

@modelcontextprotocol/server-wsl

by riparino

run_command

Execute a bash command in a WSL distribution as the default unprivileged user, returning stdout, stderr, and exit code. Supports pipes, redirections, and multi-line scripts without sudo.

Instructions

Execute a shell command inside a WSL distribution as the default (unprivileged) user. Returns stdout, stderr, and the exit code. Do NOT include 'sudo' in the command — it will hang waiting for a password that cannot be supplied. For operations that require root access use run_privileged_command instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
distroNoName of the WSL distribution to run the command in (e.g. 'Ubuntu', 'Debian'). Defaults to the system default distribution.
commandYesThe bash command to execute (passed to `bash -c`). Must not contain 'sudo'. Complex commands with pipes, redirections, and multi-line scripts are all supported.
timeout_msNoMaximum execution time in milliseconds before the command is killed. Defaults to 30000 (30 seconds). Increase for long-running operations.
Behavior5/5

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

No annotations provided, but description fully discloses behavior: runs as unprivileged user, returns stdout/stderr/exit code, uses bash -c, supports complex commands, has configurable timeout, and warns about sudo hanging. This is comprehensive.

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 with a clear function: purpose+output, sudo warning, alternative, and no extra fluff. Highly efficient and front-loaded.

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?

For a simple execution tool with no output schema, the description covers key aspects: intent, return values, limitations, and timeout. Minor omission of error handling beyond exit code, but still complete enough for agent use.

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 covers all 3 parameters with detailed descriptions (100% coverage). The description mostly reiterates schema content; it adds slight context about supporting complex commands and timeout usage, but baseline is 3 per guidelines.

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?

Clearly states 'Execute a shell command inside a WSL distribution' with specific verb and resource. Distinguishes from sibling run_privileged_command by specifying 'unprivileged user' and explicitly warns against using sudo, which differentiates 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 Guidelines5/5

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

Explicitly tells when to use this tool vs. alternatives: 'Do NOT include sudo... For operations that require root access use run_privileged_command instead.' This provides clear context for selecting the right tool.

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