Skip to main content
Glama

winrm_execute_powershell

Destructive

Execute PowerShell commands on Windows hosts over WinRM and return stdout, stderr, and exit code; supports timeouts, environment variables, working directories, and JSON output.

Instructions

Execute PowerShell over WinRM and return stdout, stderr (error/warning/verbose streams) and the exit code, including exit N. On timeout the remote command is stopped. output_format='json' converts the output objects with ConvertTo-Json and returns them parsed in data.

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_powershell"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNo
envNo
commandYes
timeoutNo
connectionNo
saved_hostNo
output_limitNo
output_formatNotext
inventory_scopeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / output_format
      Added value: +{
      +  "default": "text",
      +  "title": "Output Format",
      +  "type": "string"
      +}
  2. First observedv0.2.2

TDQS

A3.6/5.0
Behavior4/5

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

The description adds real behavior beyond the annotations: timeout stops the remote command, which stderr streams are captured, exit-code propagation including `exit N`, and what output_format='json' does to the returned data. It does not repeat the destructive/openWorld hints, but those are already carried by annotations.

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 dense sentences with no filler, and the core behavior plus return contract is front-loaded before the output_format detail.

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 do not need explaining, and the mutation/timeout semantics are covered. However, for a 9-parameter remote-execution tool with zero schema descriptions, the targeting and environment parameters that determine which host runs the command are left undefined.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 9 parameters, so the description is the only source of parameter meaning, yet it only explains output_format and implicitly timeout. Host targeting (connection, saved_host, inventory_scope), cwd, env, and output_limit are completely unexplained, leaving most of the surface undocumented.

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?

"Execute PowerShell over WinRM" names a specific verb and resource and returns a concrete payload (stdout, stderr streams, exit code). It is clearly distinguishable from the sibling winrm_execute_cmd (cmd shell) and winrm_execute_many without reading any schema.

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 such as winrm_execute_cmd or winrm_execute_many. An agent must infer selection 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.