Skip to main content
Glama

cmd_admin_run

Run Windows CMD commands with administrator privileges to execute elevated tasks like netsh, sc query, icacls, dism, and sfc, capturing output for review.

Instructions

Run a Windows CMD command with Administrator (elevated) privileges. Uses PowerShell Start-Process -Verb RunAs to launch an elevated cmd.exe. Output is captured via temp files since elevated processes cannot pipe stdio to non-elevated parents. Use this for commands that require admin rights (e.g., netsh, sc query, icacls, dism, sfc). NOTE: UAC prompt may appear if not already elevated.

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

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory. Defaults to the server start directory.
commandYesThe CMD command to run as Administrator
timeoutNoTimeout in ms. Defaults to 15000. Max 30000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose real behavior: elevation via Start-Process -Verb RunAs, the fact that output is captured through temp files because elevated processes cannot pipe stdio, and that a UAC prompt may appear. It stops short of describing failure behavior — what happens if UAC is declined, whether the call blocks until the elevated process exits, or how temp-file output is shaped or cleaned up.

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?

Four tight sentences, front-loaded with the core action and privilege level, then mechanism, then usage, then the UAC caveat. Minor redundancy between "Administrator (elevated) privileges" and "elevated cmd.exe", but nothing that wastes real space.

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?

For a privileged-execution tool with no annotations and no output schema, the definition covers mechanism and invocation but leaves the response contract unstated: it does not say whether exit code, stderr, or combined output is returned, nor how the temp-file capture surfaces to the caller. An agent can call it correctly but cannot predict what it will get back on success or failure.

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 100%, so command, cwd, and timeout are already documented including the 15000ms default and 30000ms cap. The description adds no per-parameter meaning beyond noting that output capture is indirect, which is the expected baseline when the schema does the heavy lifting.

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 gives a specific verb, resource, and privilege level ("Run a Windows CMD command with Administrator (elevated) privileges") plus the underlying mechanism (Start-Process -Verb RunAs). It implicitly separates itself from the non-elevated sibling cmd_run by scoping itself to commands needing admin rights, but never names that sibling explicitly.

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

Usage Guidelines4/5

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

"Use this for commands that require admin rights" is a clear selection rule, reinforced with concrete examples (netsh, sc query, icacls, dism, sfc). No explicit when-not guidance or named alternative (e.g. use cmd_run otherwise) is provided, so the agent must infer the complement.

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