Skip to main content
Glama

powershell_run

Execute PowerShell commands without hanging by disabling prompts, encoding input to avoid escaping problems, and enforcing timeouts.

Instructions

Run a PowerShell command without hanging. Uses -NonInteractive -NoProfile flags to prevent prompts and speed up startup. Command is Base64-encoded to avoid escaping issues.

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": "powershell_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory. Defaults to the server start directory.
commandYesPowerShell command or script block to run
timeoutNoTimeout in ms. Defaults to 10000. Max 30000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose genuinely useful behavior: -NonInteractive and -NoProfile suppress prompts and speed startup, and Base64 encoding avoids escaping problems. However, for an arbitrary-code-execution tool it says nothing about whether output (stdout/stderr), exit codes, or errors are returned, nor what happens on timeout.

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?

Three short sentences, front-loaded with the primary benefit (not hanging) and then the mechanism. No filler. Could be slightly tighter by folding the flag and encoding notes into one clause, but nothing is wasted.

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

Completeness3/5

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

With no annotations and no output schema, the description should cover what the caller gets back and how failures surface. The timeout is only visible via the schema, and the return shape is unexplained, leaving the agent to guess how to interpret results from a command-execution 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 100%, so cwd, command, and timeout are already documented, and cwd and timeout defaults are stated in the schema itself. The description adds one genuinely new fact: the command string is Base64-encoded transparently by the server, so the agent should send raw text. That is marginal added meaning over the schema, matching the baseline of 3.

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?

The description uses a specific verb and resource ("Run a PowerShell command") and states the scope constraint ("without hanging"). It is clearly distinguishable from a generic command runner by naming PowerShell explicitly, though it never references the sibling tools (cmd_run, cmd_admin_run) it sits beside.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance and no mention of alternatives. The agent must infer from the name alone that this is the PowerShell path rather than the CMD path, and nothing tells it when a different tool (e.g. batch execution) would be preferable.

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