Skip to main content
Glama

set_cluster_security_policy_mode

Destructive

Switch a cluster's pod-security policies between audit (violations are reported), enforce (violating pods are rejected at admission) and off (the Kyverno policy engine is uninstalled from the cluster; native pod security keeps observing in audit). Enforce can block deployments that violate the baseline - read get_cluster_policy_violations first and only enforce when the list is clean or every violation is understood. Off is for clusters whose control planes cannot afford the engine's admission webhook and reports controller; audit or enforce afterwards do not reinstall it. Committed to the GitOps repository and applied by the reconciler. Reversible between audit and enforce.

Input Schema

NameRequiredDescriptionDefault
modeYesaudit, enforce or off.
cluster_idNoCluster id (UUID). Optional when the conversation is bound to a cluster.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and non-idempotent, but the description goes further: off uninstalls the Kyverno engine and is not reversed by a later audit/enforce, changes are committed to GitOps and applied by the reconciler, and audit<->enforce is reversible. These are exactly the destructive/irreversible details an agent needs before calling.

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?

Content is front-loaded with the mode set and then the risks, and every sentence carries substantive information. It is dense with parenthetical clauses but not padded, so it stays efficient for the amount of behavior it must convey.

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 mutating tool with no output schema, the definition covers targets, consequences, prerequisites, reversibility and GitOps propagation. An agent has everything needed to choose a mode and anticipate the outcome.

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 mode and cluster_id are already documented, setting a baseline of 3. The description adds real semantic value by explaining what each enum value actually does to the cluster, which the terse schema ('audit, enforce or off.') does not convey.

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 states a specific verb (switch) and resource (a cluster's pod-security policy mode) and enumerates the exact three target states with their consequences. It is easily distinguished from neighboring security tools, and it names get_cluster_policy_violations as the read companion.

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?

It gives explicit per-mode guidance: enforce only after confirming get_cluster_policy_violations is clean or understood, and off only for clusters whose control planes cannot afford the engine. Both the when and the when-not are stated, along with the concrete consequence (blocked deployments, uninstalled engine).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources