{
  "autonym_version": "1.0",
  "specification_revision": "2026-07-28",
  "status": "specified-not-implemented",
  "tools": [
    {
      "name": "get_grant",
      "description": "Describe only the authenticated current grant.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^gr_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "handle": {
                "type": "string",
                "maxLength": 294,
                "pattern": "^autonym:[a-z2-7]{32}@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$"
              },
              "client_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              "purpose": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "booking",
                      "recommendation",
                      "safety",
                      "fulfilment",
                      "personalisation",
                      "research",
                      "care",
                      "medical",
                      "employment",
                      "advertising"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                },
                "required": [
                  "category",
                  "text"
                ],
                "additionalProperties": false
              },
              "issued_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "revoked",
                  "expired"
                ]
              },
              "kind": {
                "type": "string",
                "const": "read"
              },
              "read": {
                "minItems": 1,
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
                        },
                        {
                          "type": "string",
                          "const": "*"
                        }
                      ]
                    },
                    "keys": {
                      "anyOf": [
                        {
                          "minItems": 1,
                          "maxItems": 128,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "max_level": {
                      "type": "string",
                      "enum": [
                        "L0",
                        "L1",
                        "L2",
                        "L3"
                      ]
                    }
                  },
                  "required": [
                    "domain",
                    "keys",
                    "max_level"
                  ],
                  "additionalProperties": false
                }
              },
              "declared_only": {
                "type": "boolean"
              },
              "min_confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "max_reads": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 100000
              },
              "reads_used": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "persist_until": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "allow_delegation": {
                "type": "boolean"
              },
              "onward_share": {
                "type": "boolean",
                "const": false
              }
            },
            "required": [
              "id",
              "revision",
              "handle",
              "client_id",
              "purpose",
              "issued_at",
              "expires_at",
              "status",
              "kind",
              "read",
              "declared_only",
              "min_confidence",
              "max_reads",
              "reads_used",
              "persist_until",
              "allow_delegation",
              "onward_share"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^gr_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "handle": {
                "type": "string",
                "maxLength": 294,
                "pattern": "^autonym:[a-z2-7]{32}@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$"
              },
              "client_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              "purpose": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "booking",
                      "recommendation",
                      "safety",
                      "fulfilment",
                      "personalisation",
                      "research",
                      "care",
                      "medical",
                      "employment",
                      "advertising"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                },
                "required": [
                  "category",
                  "text"
                ],
                "additionalProperties": false
              },
              "issued_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "revoked",
                  "expired"
                ]
              },
              "kind": {
                "type": "string",
                "const": "contribute"
              },
              "contribute": {
                "minItems": 1,
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
                    },
                    "keys": {
                      "minItems": 1,
                      "maxItems": 128,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
                      }
                    }
                  },
                  "required": [
                    "domain",
                    "keys"
                  ],
                  "additionalProperties": false
                }
              },
              "max_events": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 100000
              },
              "events_used": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "allow_confirmation": {
                "type": "boolean"
              },
              "stream_id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
              }
            },
            "required": [
              "id",
              "revision",
              "handle",
              "client_id",
              "purpose",
              "issued_at",
              "expires_at",
              "status",
              "kind",
              "contribute",
              "max_events",
              "events_used",
              "allow_confirmation",
              "stream_id"
            ],
            "additionalProperties": false
          }
        ],
        "$id": "urn:autonym:schema:grant:1.0:1.0-draft-1"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "list_domains",
      "description": "List eligible granted domains and keys without hidden counts.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "domains": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "domain": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
                },
                "max_level": {
                  "type": "string",
                  "enum": [
                    "L0",
                    "L1",
                    "L2",
                    "L3"
                  ]
                },
                "keys": {
                  "maxItems": 128,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
                  }
                }
              },
              "required": [
                "domain",
                "max_level",
                "keys"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "domains"
        ],
        "additionalProperties": false,
        "$id": "urn:autonym:schema:domain-list:1.0:1.0-draft-1"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "get_context",
      "description": "Read the permitted context in one counted transaction.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "domains": {
            "minItems": 1,
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
            }
          },
          "max_level": {
            "type": "string",
            "enum": [
              "L0",
              "L1",
              "L2",
              "L3"
            ]
          },
          "keys": {
            "minItems": 1,
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
            }
          },
          "declared_only": {
            "type": "boolean"
          },
          "min_confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "since": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "domains"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "autonym_version": {
            "type": "string",
            "const": "1.0"
          },
          "provider": {
            "type": "string",
            "format": "uri"
          },
          "audience": {
            "type": "string",
            "format": "uri"
          },
          "client_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          },
          "handle": {
            "type": "string",
            "maxLength": 294,
            "pattern": "^autonym:[a-z2-7]{32}@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$"
          },
          "grant_id": {
            "type": "string",
            "pattern": "^gr_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
          },
          "grant_revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "read_id": {
            "type": "string",
            "pattern": "^rd_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "booking",
              "recommendation",
              "safety",
              "fulfilment",
              "personalisation",
              "research",
              "care",
              "medical",
              "employment",
              "advertising"
            ]
          },
          "issued_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "valid_until": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ttl_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 300
          },
          "persist_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "entries": {
            "maxItems": 1000,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^rent_[a-z2-7]{52}$"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "domain": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
                },
                "key": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
                },
                "level": {
                  "type": "string",
                  "enum": [
                    "L0",
                    "L1",
                    "L2",
                    "L3"
                  ]
                },
                "value_type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "number",
                    "boolean",
                    "enum",
                    "list",
                    "coded",
                    "coded_list",
                    "date",
                    "date_range",
                    "age_band",
                    "person_ref",
                    "structured",
                    "credential"
                  ]
                },
                "value": {
                  "$ref": "#/$defs/__schema0"
                },
                "context_kind": {
                  "type": "string",
                  "enum": [
                    "fact",
                    "preference",
                    "state"
                  ]
                },
                "safety_critical": {
                  "type": "boolean"
                },
                "provenance": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "declared",
                        "observed",
                        "derived",
                        "attested"
                      ]
                    },
                    "confirmed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind",
                    "confirmed"
                  ],
                  "additionalProperties": false
                },
                "stale": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "version",
                "domain",
                "key",
                "level",
                "value_type",
                "value",
                "context_kind",
                "safety_critical",
                "provenance",
                "stale"
              ],
              "additionalProperties": false
            }
          },
          "proof": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "jws"
              },
              "alg": {
                "type": "string",
                "const": "ES256"
              },
              "kid": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
              },
              "jws": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]+\\.\\.[A-Za-z0-9_-]+$"
              }
            },
            "required": [
              "type",
              "alg",
              "kid",
              "jws"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "autonym_version",
          "provider",
          "audience",
          "client_id",
          "handle",
          "grant_id",
          "grant_revision",
          "read_id",
          "purpose",
          "issued_at",
          "valid_until",
          "ttl_seconds",
          "persist_until",
          "entries",
          "proof"
        ],
        "additionalProperties": false,
        "$defs": {
          "__schema0": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              }
            ]
          }
        },
        "$id": "urn:autonym:schema:disclosure:1.0:1.0-draft-1"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "propose_entry",
      "description": "Submit one idempotent event under a separate contribution grant.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "event_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,128}$"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "stream_id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
              },
              "domain": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
              },
              "key": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
              },
              "value_type": {
                "type": "string",
                "enum": [
                  "text",
                  "number",
                  "boolean",
                  "enum",
                  "list",
                  "coded",
                  "coded_list",
                  "date",
                  "date_range",
                  "age_band",
                  "person_ref",
                  "structured",
                  "credential"
                ]
              },
              "value": {
                "$ref": "#/$defs/__schema0"
              },
              "context_kind": {
                "type": "string",
                "enum": [
                  "fact",
                  "preference",
                  "state"
                ]
              },
              "temporal": {
                "type": "object",
                "properties": {
                  "valid_from": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "valid_until": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "valid_from",
                  "valid_until"
                ],
                "additionalProperties": false
              },
              "category": {
                "type": "string",
                "enum": [
                  "user_supplied",
                  "activity",
                  "observation",
                  "inference"
                ]
              },
              "evidence_refs": {
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "operation": {
                "type": "string",
                "const": "create"
              }
            },
            "required": [
              "event_id",
              "occurred_at",
              "stream_id",
              "domain",
              "key",
              "value_type",
              "value",
              "context_kind",
              "temporal",
              "category",
              "evidence_refs",
              "operation"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "event_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,128}$"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "stream_id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
              },
              "domain": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
              },
              "key": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
              },
              "value_type": {
                "type": "string",
                "enum": [
                  "text",
                  "number",
                  "boolean",
                  "enum",
                  "list",
                  "coded",
                  "coded_list",
                  "date",
                  "date_range",
                  "age_band",
                  "person_ref",
                  "structured",
                  "credential"
                ]
              },
              "value": {
                "$ref": "#/$defs/__schema0"
              },
              "context_kind": {
                "type": "string",
                "enum": [
                  "fact",
                  "preference",
                  "state"
                ]
              },
              "temporal": {
                "type": "object",
                "properties": {
                  "valid_from": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "valid_until": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "valid_from",
                  "valid_until"
                ],
                "additionalProperties": false
              },
              "category": {
                "type": "string",
                "enum": [
                  "user_supplied",
                  "activity",
                  "observation",
                  "inference"
                ]
              },
              "evidence_refs": {
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "operation": {
                "type": "string",
                "const": "correct"
              },
              "predecessor_event_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,128}$"
              }
            },
            "required": [
              "event_id",
              "occurred_at",
              "stream_id",
              "domain",
              "key",
              "value_type",
              "value",
              "context_kind",
              "temporal",
              "category",
              "evidence_refs",
              "operation",
              "predecessor_event_id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "event_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,128}$"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "stream_id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
              },
              "operation": {
                "type": "string",
                "const": "withdraw"
              },
              "predecessor_event_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,128}$"
              }
            },
            "required": [
              "event_id",
              "occurred_at",
              "stream_id",
              "operation",
              "predecessor_event_id"
            ],
            "additionalProperties": false
          }
        ],
        "$defs": {
          "__schema0": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              }
            ]
          }
        }
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proposal_id": {
            "type": "string",
            "pattern": "^prp_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
          },
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          },
          "ingested_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "rejected",
              "withdrawn"
            ]
          }
        },
        "required": [
          "proposal_id",
          "event_id",
          "ingested_at",
          "status"
        ],
        "additionalProperties": false,
        "$id": "urn:autonym:schema:proposal-status:1.0:1.0-draft-1"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "confirm_entry",
      "description": "Request exact-statement confirmation or first-party app review.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proposal_id": {
            "type": "string",
            "pattern": "^prp_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
          }
        },
        "required": [
          "proposal_id"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "review_required"
          },
          "review_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "status",
          "review_url"
        ],
        "additionalProperties": false,
        "$id": "urn:autonym:schema:confirmation-result:1.0:1.0-draft-1"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "withdraw_proposal",
      "description": "Withdraw only the authenticated contributor’s own proposal.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proposal_id": {
            "type": "string",
            "pattern": "^prp_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
          }
        },
        "required": [
          "proposal_id"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proposal_id": {
            "type": "string",
            "pattern": "^prp_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
          },
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          },
          "ingested_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "rejected",
              "withdrawn"
            ]
          }
        },
        "required": [
          "proposal_id",
          "event_id",
          "ingested_at",
          "status"
        ],
        "additionalProperties": false,
        "$id": "urn:autonym:schema:proposal-status:1.0:1.0-draft-1"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": false
      }
    }
  ]
}
