Skip to main content
Glama

run_command

Runs a shell command in WSL and waits for completion, returning stdout, stderr, and exit code. Supports multi-line scripts, cwd, env vars, timeout, and guardrail blocking.

Instructions

Run a shell command in WSL (foreground, waits for completion). Supports multi-line scripts, cwd, env vars, and timeout. Returns stdout (and stderr, separately when separateStderr=true; otherwise stderr is merged into stdout) and exit code. Dangerous commands are blocked by the guardrail (confirm=true overrides confirmable ones).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory (absolute POSIX or ~)
envNoEnvironment variables for this command only
distroNo
commandYesThe shell command(s) to run; may be multi-line
confirmNoConfirm a command flagged by the guardrail
timeoutMsNoTimeout in ms; default commandTimeoutMs
binaryOutputNoReturn stdout/stderr as base64 instead of UTF-8 text
separateStderrNoCapture stderr separately (stderr field) instead of merging into stdout
Behavior4/5

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

With no annotations, the description carries the full burden and discloses important behaviors: it waits for completion, returns stdout/stderr and exit code, merges stderr unless separateStderr is true, and explains the guardrail blocking dangerous commands with confirm override. It does not discuss side effects or permission requirements, but for a command runner the key behavioral traits are covered.

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?

Three focused sentences: the first states the core action and mode, the second enumerates capabilities, the third describes output and guardrail behavior. No redundant or filler language.

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 no annotations, the description covers the essential return values, synchronous execution, stderr handling, and safety guardrail. It is slightly incomplete regarding the unannotated 'distro' parameter and default behavior for timeout/cwd, but overall sufficient for a shell-command tool.

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 88%, so the schema already documents most parameters. The description adds semantic context for behavior (stderr merging, guardrail, multi-line) but does not add meaning to the undocumented 'distro' parameter or explain defaults like timeoutMs/cwd, keeping it at baseline.

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 states a specific verb+resource: 'Run a shell command in WSL' with the key qualifier '(foreground, waits for completion)', clearly distinguishing it from background process siblings like start_process. It also previews supported capabilities (multi-line scripts, cwd, env, timeout), leaving no ambiguity about its function.

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 makes the synchronous/foreground behavior explicit, implying it should be used when a command's completion and exit code are needed immediately. It does not explicitly name alternatives like start_process for background execution, so it stops short of full when/when-not guidance.

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

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