Skip to main content
Glama
sandraschi

Windows Operations MCP

by sandraschi

winops_cmd_powershell

Execute PowerShell commands on Windows and get stdout, stderr, exit code, and execution time with configurable timeouts and working directories.

Instructions

Execute a PowerShell command and return stdout, stderr, exit_code, execution_time.

Return Format

{
  "success": bool,
  "message": str,
  "stdout": str,
  "stderr": str,
  "exit_code": int,
  "execution_time": float,
  "next_steps": str | [],
  "sampling_advice": str
}

Examples

powershell(command="Get-Service | Where-Object Status -eq 'Running'")
powershell(command="Get-Process | Sort-Object CPU -Descending | Select -First 10")

Notes:

  • Uses asyncio.to_thread — never blocks the event loop.

  • ctx.sample() capped at 10s to prevent hang on unsupported clients.

  • Safety guards block Linux-isms (grep, tail, rm -rf, etc.) and em dashes.

  • stdout/stderr truncated at max_output_size chars each.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesPowerShell command to execute.
stdin_dataNoOptional data to pipe to stdin of the command.
max_output_sizeNoTruncate stdout/stderr at this many chars.
timeout_secondsNoHard timeout 1-300s.
working_directoryNoOptional working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations indicate this is a mutating tool (readOnlyHint: false), but the description adds value beyond this. It discloses async execution ('Uses asyncio.to_thread — never blocks the event loop'), a critical safety cap ('ctx.sample() capped at 10s'), and output truncation behavior ('stdout/stderr truncated at max_output_size chars each'). The score isn't a 5 because it doesn't detail failure modes, exact auth/privilege requirements, or the nature of the 'em dashes' blocking.

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?

The description is well-structured with a single-sentence summary, a clear 'Return Format' section, useful examples, and a bulleted 'Notes' section. It's front-loaded. It loses a point for potential redundancy; the return format is fully defined in the output schema and the output truncation note partially duplicates the max_output_size parameter description.

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?

The context signals place the output schema externally. The description covers critical operational details: it's non-blocking, includes safety caps (10s sampling limit), and has safety guards against 'Linux-isms'. For a tool whose core function is to execute arbitrary commands, this level of disclosure about runtime behavior, truncation, and safeguards is contextually complete.

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%, including a clear description for each parameter. The description itself is mostly redundant with the schema (it mentions 'max_output_size' via the truncation note and shows usage of 'command' in examples). However, it does add slight context about stdout/stderr truncation behavior. This aligns with a baseline score of 3, as the schema does the heavy lifting.

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 'Execute a PowerShell command and return stdout, stderr, exit_code, execution_time.' It uses a specific verb ('Execute'), identifies the resource ('PowerShell command'), and delineates the outputs. This clearly distinguishes it from siblings like winops_cmd_cmd (for cmd commands) and winops_container_exec (for containers).

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?

The description notes that 'Safety guards block Linux-isms (grep, tail, rm -rf, etc.)', implicitly guiding against misuse. It also includes examples of typical usage. While it doesn't explicitly name sibling tools, the sibling list shows it's the only generic 'powershell' executor, and the note about Linux-isms clarifies it's for Windows/PowerShell tasks.

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/sandraschi/windows-operations-mcp'

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