Skip to main content
Glama

winrm_execute_cmd

Destructive

Execute CMD commands on Windows hosts over WinRM and return stdout, stderr, and exit code. Set environment variables, working directory, and timeout to control remote command runs.

Instructions

Execute a CMD command over WinRM and return stdout, stderr, and exit code. env sets real process environment variables (usable as %NAME%). On timeout the remote process is terminated.

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

Input Schema

NameRequiredDescriptionDefault
cwdNo
envNo
commandYes
timeoutNo
connectionNo
saved_hostNo
output_limitNo
inventory_scopeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructive, non-idempotent, open-world behavior, so the bar is lower; the description still adds real value by disclosing that a timeout terminates the remote process and that env values become actual process environment variables. It does not say whether termination is graceful or how partial output is handled, but the key destructive side effect is surfaced.

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 short sentences, front-loaded with purpose, then the two non-obvious parameter behaviors, then the failure mode. Nothing is wasted or repeated from the schema.

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?

An output schema exists, so return values need not be explained, and the description covers purpose and timeout behavior. However, for an 8-parameter remote-execution tool it never explains how the target host is selected (connection vs saved_host vs inventory_scope), which an agent needs to call it correctly.

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 description coverage is 0% across 8 parameters, so the description must compensate. It explains env concretely (%NAME% expansion) and clarifies timeout semantics, but leaves cwd, output_limit, connection, saved_host, and inventory_scope completely undocumented, which is a substantial residual gap.

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?

States a specific verb and resource ('Execute a CMD command over WinRM') and names the return artifacts (stdout, stderr, exit code). The word 'CMD' distinguishes it from the sibling winrm_execute_powershell without either schema being opened.

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 statement of when to choose this over winrm_execute_powershell, winrm_execute_many, or winrm_test, and no prerequisites such as needing a saved_host or connection. The agent must infer routing from the tool name alone.

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