Skip to main content
Glama

scaffold_policy

Generate a CSL policy scaffold from a plain-English description, creating a ready-to-edit template with variables and constraints for AI safety enforcement.

Instructions

Generate a CSL policy scaffold from a description.

Returns a ready-to-edit .csl template with CONFIG, DOMAIN, VARIABLES, and placeholder constraints.

Common CSL patterns: WHEN amount > 1000 THEN role MUST BE "ADMIN" WHEN risk_score > 0.8 THEN action MUST NOT BE "TRANSFER" ALWAYS True THEN tool MUST NOT BE "DELETE" WHEN user_age < 18 AND category == "ALCOHOL" THEN allowed MUST BE "NO"

Variable types: amount: 0..100000 (integer range) role: {"ADMIN", "USER"} (enum / string set) score: 0..1 (numeric range)

Args: domain_name: Name for the policy domain (e.g., "PaymentGuard", "AgentSafety"). description: Plain-English description of what the policy should enforce. variables: Optional comma-separated variable hints (e.g., "amount, role, risk_score").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domain_nameYes
descriptionYes
variablesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the output (a .csl template) and includes examples of CSL patterns and variable types, which adds useful context. However, it does not cover potential side effects, error conditions, or performance characteristics like rate limits, leaving some behavioral aspects unclear.

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?

The description is well-structured and front-loaded with the core purpose. It efficiently includes examples and variable type information, though the section on 'Common CSL patterns' and 'Variable types' could be slightly condensed. Overall, most sentences earn their place by providing essential context.

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 (generating policy scaffolds) and the presence of an output schema, the description is largely complete. It explains the input parameters thoroughly and provides examples, but it could benefit from more details on error handling or constraints. The output schema likely covers return values, so the description appropriately focuses on usage and semantics.

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?

The schema description coverage is 0%, so the description must compensate. It provides detailed semantics for all three parameters: domain_name ('Name for the policy domain'), description ('Plain-English description of what the policy should enforce'), and variables ('Optional comma-separated variable hints'), including examples. This adds significant value beyond the basic schema.

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 clearly states the tool's purpose: 'Generate a CSL policy scaffold from a description.' It specifies the verb ('Generate'), resource ('CSL policy scaffold'), and output format ('.csl template with CONFIG, DOMAIN, VARIABLES, and placeholder constraints'), distinguishing it from sibling tools like explain_policy or simulate_policy.

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?

The description provides clear context for when to use this tool: to create a policy scaffold from a plain-English description. It mentions 'ready-to-edit .csl template' and 'placeholder constraints,' implying this is for initial policy creation. However, it does not explicitly state when not to use it or name alternatives among sibling tools.

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/Chimera-Protocol/csl-core'

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