Skip to main content
Glama

Set cluster security policy mode

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.

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": {
      "mode": "<mode>"
    },
    "name": "set_cluster_security_policy_mode"
  }
}

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 flag destructiveHint=true, but the description explains exactly what is destroyed or blocked: enforce rejects violating pods at admission, off uninstalls the Kyverno engine and is not recoverable via a later mode switch. It also discloses that the change is committed to the GitOps repo and applied by the reconciler, and that audit↔enforce is reversible.

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?

Front-loaded with the mode definitions, then the safety prerequisite, then the irreversibility note — a sensible escalation of risk. The first sentence carries heavy parenthetical load, but every clause contributes operational information rather than 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 destructive mutation tool with no output schema, the description covers consequence of each mode, prerequisite read, irreversibility, and the GitOps delivery path — everything an agent needs before calling. Nothing material is left ambiguous.

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% but shallow — the mode property only lists the three values, while the description supplies the actual semantics of each mode, which is meaningful added value. It says nothing extra about cluster_id beyond the schema's optional-when-bound note, so it falls short of a 5.

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 (switch) on a specific resource (cluster's pod-security policy mode) and enumerates the three target states with their meanings. It is clearly distinguishable from siblings such as get_cluster_security_history, get_cluster_policy_violations, or enable_security_baseline.

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 routing: read get_cluster_policy_violations first and only enforce when the list is clean or all violations are understood. It also states when 'off' is appropriate (control planes that cannot afford the webhook and reports controller) and warns that audit/enforce afterwards will not reinstall it.

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.