Skip to main content
Glama
magicsword-io

magicsword-mcp

Official

Flip a policy from audit to enforcing

flip_to_enforcing
Destructive

Promote a MagicSword policy from audit to enforcing mode through Portal confirmation: get readiness, blockers, endpoint count, and a one-time token, then commit with it.

Instructions

Promotes a MagicSword policy from audit to enforcing mode through the Portal server confirmation flow. First call without confirmation_token to get readiness, blockers, endpoint count, and a one-time token. Show the preview to the human. Second call with confirmation_token to commit. Requires policies:write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policy_idYesPolicy UUID to flip
confirmation_tokenNoToken returned by the preview call. Passing this commits enforcement.
acknowledge_blockersNoSet true only when the human explicitly accepts preview blockers. Used on the preview call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial context beyond the destructiveHint/readOnlyHint annotations: a mandatory two-call confirmation flow, the contents of the preview (readiness, blockers, endpoint count, one-time token), the human-in-the-loop requirement, and the policies:write scope. These are exactly the behavioral details annotations cannot express.

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 short sentences, front-loaded with the state transition, then the two-step flow, then the permission requirement. Every sentence carries load; nothing is redundant with the schema or annotations.

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?

No output schema exists, and the description compensates by describing what the preview call returns and what the commit call does. Permissions, blocker handling, and the confirmation gate are all covered, so an agent has everything needed to invoke it correctly.

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 the baseline is 3; the description goes further by explaining the temporal role of each parameter — confirmation_token triggers the commit, and acknowledge_blockers belongs to the preview call. This sequencing semantics is not derivable from the schema alone.

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 ('Promotes a MagicSword policy from audit to enforcing mode') with the exact state transition, which cleanly separates it from read-only siblings like show_policy and list_policies. An agent can identify the operation 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?

Gives explicit procedural context: call first without confirmation_token to preview, then with the token to commit. It does not name an alternative tool (e.g. manage_policy_rules) for other policy changes, so routing is clear but exclusions are implicit.

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