Skip to main content
Glama

verify_policy

Verifies CSL policy logical consistency through Z3 formal verification, performing syntax validation, semantic checks, and conflict analysis to identify actionable errors.

Instructions

Verify a CSL policy for logical consistency using Z3 formal verification.

Performs four-stage analysis:

  1. Syntax validation (parser)

  2. Semantic validation (scope, types, function whitelist)

  3. Z3 logic verification (reachability, internal consistency, pairwise conflicts, policy-wide conflicts)

  4. IR compilation

Returns verification result with actionable error details if any issues are found.

Args: csl_content: The complete CSL policy source code as a string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csl_contentYes

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 so effectively by detailing the four-stage analysis process (syntax validation, semantic validation, Z3 logic verification, IR compilation) and the return behavior ('Returns verification result with actionable error details'). It discloses behavioral traits like error handling and analysis depth, though it lacks specifics on rate limits or performance characteristics.

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 front-loaded with the core purpose, followed by a bullet-point list of analysis stages and a clear parameter explanation. Every sentence adds value without redundancy, making it efficient and well-structured for quick comprehension by an AI agent.

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 complexity of formal verification, the description is complete enough: it outlines the multi-stage process, specifies the single required parameter, and notes the return behavior. With an output schema present, it does not need to detail return values, and the absence of annotations is compensated by the detailed behavioral disclosure.

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?

The schema description coverage is 0%, so the description must compensate, which it does by explaining the parameter 'csl_content' as 'The complete CSL policy source code as a string.' This adds crucial meaning beyond the schema's basic type information, clarifying the expected content format. However, it does not provide examples or constraints beyond being a string.

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 ('verify a CSL policy for logical consistency') and the method ('using Z3 formal verification'), distinguishing it from siblings like 'explain_policy' or 'simulate_policy' by focusing on verification rather than explanation or simulation. It provides a verb+resource+method combination that is precise and unambiguous.

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?

The description implies usage through the detailed four-stage analysis, suggesting it's for verifying policy consistency, but it does not explicitly state when to use this tool versus alternatives like 'tla_verify' or 'scaffold_policy'. No exclusions or prerequisites are mentioned, leaving the agent to infer context from the analysis steps.

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