Skip to main content
Glama

policy_create_policy

Create or update a policy, or dry-run an existing policy to validate rules and rehearse enforcement before applying changes.

Instructions

Creates a new policy, updates an existing policy, or trigger a policy dry-run. Create a new policy or update an existing policy based on request body and validate its fields according to business rules or dry-run an existing policy to rehearse actual policy effect on application. POST /policy/api/policies

Input Schema

NameRequiredDescriptionDefault
bodyYesThe policy to be created or updated
dryRunNoDry-run an existing policy
validationOnlyNoFor a dry run that will do policy validation only instead of creating or updating a policy

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the safety profile is covered. The description adds that dry-run rehearses the policy's actual effect on the application and that validationOnly validates fields against business rules, which is genuine added context, but it omits create-vs-update semantics (what an absent id does, whether repeated calls duplicate policies).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The second sentence substantially restates the first ("create a new policy or update an existing policy") and the passage is a run-on chain of clauses joined by "or". Front-loading is acceptable but roughly a third of the text is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and the body is a large nested object with policy-type-specific fields, so the description should at minimum say which fields are required per mode and what a dry-run returns. It gestures at validation but leaves the mode-selection logic undocumented.

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 coverage is 100%, so the baseline is 3. The description slightly enriches dryRun by explaining it rehearses enforcement effects, but says nothing about how body.id drives create versus update, which is the single most consequential parameter behavior here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource and names the three modes (create, update, dry-run) plus the underlying endpoint. It is clearly distinguished from read siblings such as policy_get_policy or policy_get_policies, though bundling three operations into one tool muddies the single-purpose statement.

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

Usage Guidelines3/5

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

"Create ... or update ... based on request body" implies that the presence of an id selects update, but this is never stated explicitly. Nothing tells the agent when to prefer validationOnly/dryRun over a real write, or which sibling to use for read-only inspection.

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

Deploy Server

Other Tools