Getting Started
Set up guardrail-sim in your project
Getting Started
Install guardrail-sim and evaluate your first policy in 5 minutes.
Installation
Your First Policy Evaluation
The policy engine evaluates discount requests against rules:
Default Policy Rules
The default policy includes these rules:
| Rule | Description | Limit |
|---|---|---|
margin_floor | Minimum margin after discount | 15% |
max_discount | Maximum allowed discount | 25% |
volume_tier | Volume-based discount limits | 10% base, 15% for 100+ units |
Custom Policies
Create your own policy with custom rules:
Using with MCP
For AI agent integration, run the MCP server:
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
The MCP server exposes 5 tools:
evaluate_policy- Evaluate discount against policyget_policy_summary- Get human-readable policy rulesget_max_discount- Calculate maximum allowed discountvalidate_discount_code- UCP-aligned pre-validationsimulate_checkout_discount- Full checkout simulation
Next Steps
- Learn about Policies in depth
- Explore the MCP Tools reference
- See real-world examples
- Check Policy Insights for health checks