Skip to main content
Glama
sandraschi

Windows Operations MCP

by sandraschi

winops_cmd_cmd

Execute CMD commands on Windows and retrieve stdout, stderr, exit code, and execution time. Provides direct command-line control with output capture for automation and troubleshooting.

Instructions

Execute a CMD (cmd.exe) 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

cmd(command="dir /s /b *.log", working_directory="C:\Logs")
cmd(command="ipconfig /all")

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
commandYesCMD 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

Behavior5/5

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

The description adds significant behavioral context beyond the sparse annotations: it documents non-blocking execution via asyncio.to_thread, the 10s sampling cap, safety guards against Linux-isms and em dashes, output truncation, and the full return format. This far exceeds the minimal annotation signals.

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 clear lead sentence, a return-format block, examples, and bulleted notes. Each section adds value, though the return format block is somewhat redundant with the first sentence and adds a bit of extra length.

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 the output schema, examples, and behavioral notes, the description covers the essential aspects of invoking and interpreting this tool. It could be more complete by mentioning command-provenance or working-directory defaults, but it is largely sufficient for 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 the baseline is 3. The description adds example usage for command and working_directory and a truncation note, but does not meaningfully elaborate on stdin_data, max_output_size, or timeout_seconds beyond what the schema already states.

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 opens with a specific verb and resource: 'Execute a CMD (cmd.exe) command' and names the return fields (stdout, stderr, exit_code, execution_time). This clearly distinguishes it from the PowerShell sibling tool and other command-execution tools.

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

Usage Guidelines3/5

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

Examples and safety notes imply usage context, and the explicit 'cmd.exe' wording helps differentiate from winops_cmd_powershell. However, it never explicitly says when to use this tool versus alternatives or when not to use it, so the guidance remains implicit rather than directive.

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