Skip to main content
Glama

simulate_policy

Test CSL safety policies against JSON inputs to determine if they allow or block actions with detailed violation reports. Supports batch testing and dry-run evaluation.

Instructions

Simulate a CSL policy against one or more JSON inputs.

Compiles the policy, then runs the runtime guard against the provided context. Returns ALLOWED or BLOCKED with full violation details.

Supports batch simulation: pass a JSON array of objects to test multiple inputs.

Args: csl_content: The complete CSL policy source code as a string. context_json: JSON object (single input) or JSON array (batch) to test. dry_run: If true, evaluates all rules but never blocks. Useful for shadow testing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csl_contentYes
context_jsonYes
dry_runNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it compiles and runs the policy, returns ALLOWED/BLOCKED with violation details, supports batch processing, and explains the dry_run flag's effect ('evaluates all rules but never blocks'). It lacks details on error handling, performance, or rate limits, but covers core functionality adequately.

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?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by key behavioral details, batch support, and a structured Args section. Every sentence adds value without redundancy, and the bullet-point-like Args enhance readability without wasting space.

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?

Given the tool's complexity (policy simulation with batch support), no annotations, and an output schema present (which handles return values), the description is complete enough. It covers purpose, usage, parameters, and key behaviors like dry_run, leaving output details to the schema. No significant gaps remain for effective agent use.

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?

Schema description coverage is 0%, so the description must compensate fully. It successfully adds meaning beyond the bare schema: it explains that 'csl_content' is 'complete CSL policy source code', 'context_json' can be a single object or array for batch testing, and 'dry_run' is for 'shadow testing' with a specific behavior. This provides essential context missing from the 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 specific action ('simulate a CSL policy'), the target resource ('against one or more JSON inputs'), and distinguishes from siblings by focusing on runtime evaluation rather than explanation, scaffolding, or verification. The verb 'simulate' is precise and differentiates from tools like 'explain_policy' or 'verify_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 test multiple inputs' via batch simulation) and mentions a specific use case ('shadow testing' with dry_run). However, it does not explicitly state when NOT to use it or name alternatives among sibling tools like 'explain_policy' for debugging or 'verify_policy' for formal verification.

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