{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://getzero.dev/contracts/zero.mcp.refusal.v1.schema.json",
  "title": "ZERO public MCP refusal",
  "description": "Structured refusal payload returned when public /oss/mcp is asked to mutate runtime or execute orders.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "decision",
    "tool",
    "reason",
    "allowed_surface",
    "disallowed_actions",
    "next_step"
  ],
  "properties": {
    "type": { "const": "zero.mcp.refusal.v1" },
    "decision": { "const": "refused" },
    "tool": { "type": "string", "minLength": 1 },
    "reason": { "const": "public_oss_mcp_is_read_only" },
    "allowed_surface": { "const": "/oss/mcp" },
    "disallowed_actions": {
      "type": "array",
      "minItems": 5,
      "uniqueItems": true,
      "items": {
        "enum": [
          "order_execution",
          "session_mutation",
          "runtime_mutation",
          "secret_access",
          "live_account_state"
        ]
      }
    },
    "next_step": { "type": "string", "minLength": 20 }
  }
}
