{
  "apiVersion": "kastra/v1",
  "kind": "Policy",
  "metadata": {
    "name": "docs-local-mcp",
    "environment": "docs-mcp"
  },
  "spec": {
    "default_decision": "allow",
    "deny": [
      {
        "reason": "Deny the harmless documentation test",
        "jurisdiction": "*",
        "model_prefix": "*",
        "priority": 100,
        "trigger": "pre_inference",
        "effect": "deny",
        "conditions": [
          {
            "attribute": "x-kastra-attr-mcp-server",
            "operator": "eq",
            "value": "kastra-docs-echo"
          },
          {
            "attribute": "x-kastra-attr-tool",
            "operator": "eq",
            "value": "docs_echo"
          },
          {
            "attribute": "x-kastra-attr-tool-input",
            "operator": "contains",
            "value": "kastra-docs-deny"
          }
        ]
      },
      {
        "reason": "Hold the harmless documentation test",
        "jurisdiction": "*",
        "model_prefix": "*",
        "priority": 100,
        "trigger": "pre_inference",
        "effect": "hold",
        "conditions": [
          {
            "attribute": "x-kastra-attr-mcp-server",
            "operator": "eq",
            "value": "kastra-docs-echo"
          },
          {
            "attribute": "x-kastra-attr-tool",
            "operator": "eq",
            "value": "docs_echo"
          },
          {
            "attribute": "x-kastra-attr-tool-input",
            "operator": "contains",
            "value": "kastra-docs-hold"
          }
        ],
        "hold_timeout_seconds": 300,
        "hold_on_timeout": "deny"
      }
    ]
  }
}
