Skip to main content
Glama
magicsword-io

magicsword-mcp

Official

Create a MagicSword policy

create_policy

Creates a new empty audit-mode policy (version 1) for an organization by name and platform, defaulting to blocklist; use the returned ID to add rules and intel sources.

Instructions

Creates a new empty policy in the authenticated organization with version 1 in audit mode. Requires a name, platform, and policies:write. Defaults to blocklist; strict requires Enterprise and is supported only for Windows/macOS. Does not add rules, attach feeds, make it the default, assign devices, or enable enforcement. Use the returned policy ID with manage_policy_rules and manage_policy_intel_sources to build the policy. Each successful call creates a new policy, even with the same name. If the outcome is uncertain, list policies before retrying.

Input Schema

NameRequiredDescriptionDefault
nameYesName for the new policy
platformYesOperating system for this policy
policy_modeNoDefaults to blocklist. Strict requires Enterprise and is unsupported on Linux.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.5

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare non-read-only, non-idempotent, non-destructive, and the description corroborates this with 'Each successful call creates a new policy, even with the same name' and duplicate-retry guidance. It adds real behavioral context beyond annotations: audit-mode creation, preconditions (policies:write, Enterprise for strict), and platform limits.

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?

Front-loaded with the core action and resulting state, then constraints, then next-step routing, then retry safety. Dense but every sentence carries operational information; no filler.

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?

For a mutation tool with no output schema, the description covers prerequisites, defaults, edition/platform constraints, non-idempotency, follow-up tools, and the returned policy ID. An agent has everything needed to invoke it correctly and safely.

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 fields are already documented, but the description still adds meaning: policy_mode defaults to blocklist, strict requires Enterprise, and strict is Windows/macOS only. Minor gap only in not restating the name constraints, which the schema fully covers.

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 ('Creates a new empty policy in the authenticated organization') plus the resulting state ('version 1 in audit mode'). It is clearly separable from siblings like manage_policy_rules, apply_policy_to_endpoints, and flip_to_enforcing, which it explicitly names or excludes.

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

Usage Guidelines5/5

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

Gives explicit scope limits ('Does not add rules, attach feeds, make it the default, assign devices, or enable enforcement') and routes the agent forward to manage_policy_rules and manage_policy_intel_sources. It also handles the retry case: list policies before retrying when the outcome is uncertain.

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