Skip to main content
Glama
MCP Active Directory Server

MCP Active Directory Server

by AlexLiAtDuo

ad_run_command

Execute PowerShell commands on a target domain controller for advanced Active Directory diagnostics or remediation; disabled by default and audit logged.

Instructions

Run an arbitrary PowerShell command on the target DC. WARNING: DANGEROUS - disabled by default. Set AD_ENABLE_RUN_COMMAND=true to enable. All executions are audit logged.

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

Input Schema

NameRequiredDescriptionDefault
targetNoTarget DC to run against (e.g., "DC1", "DC2"). Omit to use default.
commandYesPowerShell command or script block to execute on the remote DC

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full disclosure burden and does so unusually well: it flags the operation as DANGEROUS, notes it is gated off by default, names the exact environment variable that enables it, and states that executions are audit logged. It stops short of describing failure behavior, timeouts, or the required remote permissions, which keeps it out of the top band.

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?

Three short sentences with no filler, and the verb-plus-resource statement comes first. The safety warning could arguably be front-loaded ahead of the action sentence, but the ordering is still easy to scan.

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?

No output schema exists, so the definition should ideally hint at what comes back, and it does not. For a two-parameter tool with fully documented schema coverage, though, the essential safety, gating, and audit context is all present, leaving only return-value and failure semantics as gaps.

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%, with both 'target' and 'command' fully documented in the schema including the default-target behavior. The description adds no meaning beyond that, so the baseline of 3 applies.

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 definition opens with a concrete verb and resource: 'Run an arbitrary PowerShell command on the target DC.' That is specific enough that an agent can separate it from sibling tools such as ad_ldap_query or ad_diagnose_winrm without opening either schema.

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?

The definition states a strong prerequisite (disabled by default, requires AD_ENABLE_RUN_COMMAND=true), which is real guidance about when this tool will actually work. However, it never says when to prefer this over the purpose-built siblings listed, so the agent has to infer that this is the fallback for tasks no dedicated tool covers.

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