Skip to main content
Glama
magicsword-mcp

magicsword-mcp

Official

Download a generated Windows policy

download_policy

Downloads the current Windows policy as WDAC XML ZIP or AppLocker XML and saves it locally without overwriting existing files, returning the saved path, SHA256, version, and byte count.

Instructions

Download the current Windows policy as a WDAC XML ZIP (format=wdac, default) or compatible AppLocker XML (format=applocker). Requires policies:read and Enterprise agentless deployment access. Saves on the machine running this local MCP server, in ~/Downloads by default or an explicitly requested absolute output_directory. Creates a new file without overwriting existing files. Returns the saved path, SHA256, version and byte count. AppLocker is a blocklist projection: review omitted rules before deployment. Preserves audit/enforcing mode; downloading does not install, assign, compile or enforce a policy. Never execute the downloaded file.

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": {
      "policy_id": "<policy_id>"
    },
    "name": "download_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoWDAC ZIP or AppLocker XMLwdac
policy_idYesWindows policy ID from list_policies
output_directoryNoOptional absolute local directory or ~/ path; defaults to ~/Downloads

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.7

TDQS

A4.6/5.0
Behavior5/5

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

The annotations mark this as a non-readOnly, non-idempotent, non-destructive write, and the description explains exactly why: it creates a new file and never overwrites, writes on the machine hosting the local MCP server, and the default ~/Downloads location. It adds auth requirements, the returned fields (saved path, SHA256, version, byte count), the AppLocker blocklist caveat, and the fact that audit/enforcing mode is preserved. Consistent with, and far richer than, the annotations.

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 definition is front-loaded with purpose and format, then permissions, then side effects and return values, with no filler sentences. It is on the long side at roughly eight sentences, but each carries distinct operational information, so the length is largely earned.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description compensates by listing the returned fields, and it documents the file-writing side effect, permissions, and format-specific risk. For a three-parameter download tool, nothing an agent needs in order to call it safely is missing.

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

Parameters4/5

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

Schema coverage is 100%, so a baseline of 3 applies, and the description still adds real meaning: it clarifies that WDAC yields a ZIP while AppLocker yields XML, restates the wdac default, and spells out that output_directory must be absolute or ~/ based and defaults to ~/Downloads.

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 names a specific verb+resource ('Download the current Windows policy') and enumerates the two output formats with defaults. That clearly separates it from sibling tools such as list_policies, show_policy, create_policy and apply_policy_to_endpoints, none of which produce a file.

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?

It sets clear preconditions (policies:read plus Enterprise agentless deployment access) and a strong negative scope ('downloading does not install, assign, compile or enforce a policy'), which implicitly routes enforcement to a sibling like apply_policy_to_endpoints. It never names an alternative tool outright, so it falls short of an explicit when-to-use/when-not-to-use routing statement.

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