Skip to main content
Glama
magicsword-mcp

magicsword-mcp

Official

Clone a MagicSword policy

clone_policy

Copy an existing policy into a new independent audit-mode version with a chosen name, preserving supported rules, settings, and links without assigning devices or enabling enforcement.

Instructions

Copies the current version of a policy into a new, independent policy with the requested name. Preserves supported rules, settings, intelligence source links and collection links; starts at version 1 in audit mode. Does not assign devices, change the source, make a default, or enable enforcement. Requires policies:write and access to all copied content. Use apply_policy_to_endpoints with the returned policy ID to preview a later assignment. Never automatically retry cloning: list policies if the outcome is uncertain.

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": "<name>"
    },
    "name": "clone_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName for the new audit copy
policy_idYesSource policy ID from list_policies

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.6

TDQS

A4.5/5.0
Behavior5/5

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

The annotations only say this is a non-read-only, non-idempotent, non-destructive mutation; the description goes well beyond that by disclosing what is preserved (rules, settings, intel source and collection links), the resulting state (version 1, audit mode), the permissions required (policies:write plus access to all copied content), and the non-retry safety rule. The explicit negation list of side effects it will NOT perform (no device assignment, no source change, no default, no enforcement) is exactly the kind of behavioral context an agent needs before mutating.

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?

Four front-loaded sentences: what it does, what it preserves/produces, what it deliberately does not do, then permissions and follow-up. No filler, and the safety-critical non-retry warning is placed last where it is still prominent. Every sentence carries distinct information.

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 two-parameter mutation with no output schema, the description covers the result state, required permissions, the exact boundary of side effects, and the failure/retry path. An agent has everything needed to invoke it correctly and to handle an ambiguous outcome safely.

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%, and the schema already documents both policy_id (source policy from list_policies) and name (name for the new audit copy). The description restates 'requested name' and 'current version' without adding format, constraint, or naming-convention detail beyond the schema, 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 first sentence gives a specific verb (copies) and resource (current version of a policy) plus the exact output shape: a new, independent policy with the requested name. It also implies the distinction from create_policy by specifying that it clones existing content rather than authoring anew, so an agent can pick it out of a large sibling list without opening the schema.

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 explicitly routes the agent forward (use apply_policy_to_endpoints with the returned policy ID) and gives a concrete recovery rule (never auto-retry; use list_policies if the outcome is uncertain). What it lacks is an explicit statement of when to clone versus when to use create_policy for a from-scratch policy, which would complete the routing picture.

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