Skip to main content
Glama

create_policy

Define custom governance policies for agent actions using regex patterns and severity levels. Policies are evaluated on every action submission.

Instructions

Create a custom governance policy for your agent's actions.

Define rules with regex patterns and severity levels. Policies are evaluated alongside built-in policies on every action submission. Requires Starter plan.

Args: name: Policy name (alphanumeric, underscores, hyphens). E.g. "pii_protection". description: Human-readable description of what this policy enforces. rules: List of rule dicts. Each rule needs: - match: regex pattern to detect (e.g. "(ssn|social.security)") - severity: "critical", "high", "medium", or "low" - reason: (optional) violation message template, use {match} for matched text - context_requires: (optional) additional regex that must also match - confidence: (optional) 0.0-1.0, default 0.85 step_types: Which step types to evaluate (default: ["ACTION"]). whitelisted_domains: Domains to skip evaluation for.

Returns: JSON string confirming policy creation with version number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
rulesNo
step_typesNo
descriptionNo
whitelisted_domainsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations only provide readOnlyHint=false, which is consistent. The description adds that policies are evaluated on every action submission and requires a plan. However, it does not disclose whether policies can be overwritten or any side effects of creation, which limits transparency for a write operation.

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?

Description is well-structured: an introductory sentence followed by parameter details in a bullet-like format. Every sentence adds value, and the purpose is front-loaded. No redundancy.

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

Completeness4/5

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

Given the tool's complexity (5 parameters, nested structures) and the presence of an output schema, the description covers all aspects: purpose, parameters, return format, and plan requirement. Lacks mention of error handling or limits on number of policies, but is sufficient for agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by detailing all parameters: name, description, rules (with sub-fields like match, severity, reason, etc.), step_types, and whitelisted_domains. Examples are given (e.g., 'pii_protection').

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?

Description clearly states 'Create a custom governance policy for your agent's actions.' The verb 'create' and noun 'policy' are specific, and it distinguishes from sibling tools like check_policy (evaluate an action) and list_policies (list existing policies).

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?

Description provides clear context: policies are evaluated alongside built-in policies on every action submission, and requires Starter plan. However, it does not explicitly state when not to use this tool or compare to alternatives like check_policy or delete_policy.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/novyxlabs/novyx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server