[
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "Discover voxelite.v1, session epoch, limits, CPU renderer, exact palette presets and open model IDs. Start here; use returned epoch and revisions for edits.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {},
      "required": [],
      "type": "object"
    },
    "name": "voxelite_capabilities_get",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "api_version": {
              "const": "voxelite.v1"
            },
            "documents": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "bounds": {
                    "additionalProperties": true,
                    "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                    "properties": {
                      "max": {
                        "items": {
                          "maximum": 32768,
                          "minimum": -32767,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      },
                      "min": {
                        "items": {
                          "maximum": 32767,
                          "minimum": -32768,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "min",
                      "max"
                    ],
                    "type": "object"
                  },
                  "comments": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "dirty": {
                    "type": "boolean"
                  },
                  "head_id": {
                    "anyOf": [
                      {
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "layers": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        "locked": {
                          "type": "boolean"
                        },
                        "name": {
                          "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                          "maxLength": 128,
                          "minLength": 1,
                          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                          "type": "string"
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "voxel_count": {
                          "maximum": 9223372036854775807,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "visible",
                        "locked",
                        "voxel_count"
                      ],
                      "type": "object"
                    },
                    "maxItems": 64,
                    "minItems": 1,
                    "type": "array"
                  },
                  "model_id": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "name": {
                    "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "palette_slots": {
                    "maximum": 256,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "redo_id": {
                    "anyOf": [
                      {
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "revision": {
                    "description": "Captured monotonic revision, encoded as a decimal u64 string.",
                    "pattern": "^(0|[1-9][0-9]{0,19})$",
                    "type": "string"
                  },
                  "versions": {
                    "maximum": 64,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "voxel_count": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "model_id",
                  "revision",
                  "name",
                  "bounds",
                  "layers",
                  "dirty",
                  "voxel_count",
                  "palette_slots",
                  "comments",
                  "versions",
                  "head_id",
                  "redo_id"
                ],
                "type": "object"
              },
              "maxItems": 8,
              "minItems": 0,
              "type": "array"
            },
            "durability": {
              "const": "memory"
            },
            "formats": {
              "items": {
                "maxLength": 16,
                "minLength": 1,
                "type": "string"
              },
              "maxItems": 5,
              "minItems": 1,
              "type": "array"
            },
            "limits": {
              "additionalProperties": true,
              "properties": {
                "batch_operations": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                "explicit_voxels": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                "open_documents": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                "operation_receipts": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                "read_voxels": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                "receipt_bytes": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                "request_bytes": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                "result_bytes": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                "work_units": {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "open_documents",
                "request_bytes",
                "result_bytes",
                "batch_operations",
                "explicit_voxels",
                "read_voxels",
                "work_units",
                "operation_receipts",
                "receipt_bytes"
              ],
              "type": "object"
            },
            "presets": {
              "items": {
                "maxLength": 32,
                "minLength": 1,
                "type": "string"
              },
              "maxItems": 7,
              "minItems": 1,
              "type": "array"
            },
            "protocol_versions": {
              "items": {
                "enum": [
                  "2025-11-25",
                  "2026-07-28"
                ],
                "type": "string"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            },
            "renderer": {
              "const": "cpu"
            }
          },
          "required": [
            "api_version",
            "protocol_versions",
            "limits",
            "documents",
            "renderer",
            "formats",
            "presets",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Create a persistent voxel/region anchored thread. Author is always agent, never caller-supplied. Text is plain text, max 4096 UTF-8 bytes. Returns thread/message IDs; undoable and saved in .voxl.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "anchor": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "at": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "kind": {
                  "const": "voxel"
                }
              },
              "required": [
                "kind",
                "at"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "region"
                },
                "max": {
                  "items": {
                    "maximum": 32768,
                    "minimum": -32767,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "min": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                }
              },
              "required": [
                "kind",
                "min",
                "max"
              ],
              "type": "object"
            }
          ]
        },
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "message_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "text": {
          "maxLength": 4096,
          "minLength": 1,
          "type": "string"
        },
        "thread_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "anchor",
        "text"
      ],
      "type": "object"
    },
    "name": "voxelite_comments_add",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "message_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "thread_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability",
            "thread_id",
            "message_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "List anchored threads including messages, agent/human roles, resolved state and anchor status. Optional state=open|resolved|all (default all). Thread and message pages default to 50, max 200. message_offset applies per thread; bind pages with revision.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "limit": {
          "maximum": 200,
          "minimum": 1,
          "type": "integer"
        },
        "message_limit": {
          "maximum": 200,
          "minimum": 1,
          "type": "integer"
        },
        "message_offset": {
          "maximum": 10000,
          "minimum": 0,
          "type": "integer"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "offset": {
          "maximum": 1024,
          "minimum": 0,
          "type": "integer"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "state": {
          "enum": [
            "open",
            "resolved",
            "all"
          ],
          "type": "string"
        }
      },
      "required": [
        "model_id"
      ],
      "type": "object"
    },
    "name": "voxelite_comments_list",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "comments": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "anchor_state": {
                    "enum": [
                      "visible",
                      "hidden",
                      "orphaned"
                    ],
                    "type": "string"
                  },
                  "message_count": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "next_message_offset": {
                    "anyOf": [
                      {
                        "maximum": 9223372036854775807,
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "thread": {
                    "additionalProperties": true,
                    "properties": {
                      "anchor": {
                        "oneOf": [
                          {
                            "additionalProperties": true,
                            "properties": {
                              "at": {
                                "items": {
                                  "maximum": 32767,
                                  "minimum": -32768,
                                  "type": "integer"
                                },
                                "maxItems": 3,
                                "minItems": 3,
                                "type": "array"
                              },
                              "kind": {
                                "const": "voxel"
                              }
                            },
                            "required": [
                              "kind",
                              "at"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": true,
                            "properties": {
                              "kind": {
                                "const": "region"
                              },
                              "max": {
                                "items": {
                                  "maximum": 32768,
                                  "minimum": -32767,
                                  "type": "integer"
                                },
                                "maxItems": 3,
                                "minItems": 3,
                                "type": "array"
                              },
                              "min": {
                                "items": {
                                  "maximum": 32767,
                                  "minimum": -32768,
                                  "type": "integer"
                                },
                                "maxItems": 3,
                                "minItems": 3,
                                "type": "array"
                              }
                            },
                            "required": [
                              "kind",
                              "min",
                              "max"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "id": {
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                        "type": "string"
                      },
                      "layer": {
                        "anyOf": [
                          {
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "messages": {
                        "items": {
                          "additionalProperties": true,
                          "properties": {
                            "id": {
                              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                              "type": "string"
                            },
                            "origin": {
                              "enum": [
                                "agent",
                                "human"
                              ],
                              "type": "string"
                            },
                            "text": {
                              "maxLength": 8192,
                              "minLength": 1,
                              "type": "string"
                            },
                            "tool": {
                              "anyOf": [
                                {
                                  "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                                  "maxLength": 128,
                                  "minLength": 1,
                                  "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "origin",
                            "text",
                            "tool"
                          ],
                          "type": "object"
                        },
                        "maxItems": 200,
                        "minItems": 0,
                        "type": "array"
                      },
                      "resolved": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "anchor",
                      "layer",
                      "resolved",
                      "messages"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "thread",
                  "message_count",
                  "next_message_offset",
                  "anchor_state"
                ],
                "type": "object"
              },
              "maxItems": 200,
              "minItems": 0,
              "type": "array"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "next_offset": {
              "anyOf": [
                {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "total": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "comments",
            "total",
            "next_offset"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Reopen a resolved discussion; idempotent if already open. Preserves messages and anchor; undoable.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "thread_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "thread_id"
      ],
      "type": "object"
    },
    "name": "voxelite_comments_reopen",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Append an agent-attributed plain-text reply to a thread, resolved or open. One undoable edit; returns message ID.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "message_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "text": {
          "maxLength": 4096,
          "minLength": 1,
          "type": "string"
        },
        "thread_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "thread_id",
        "text"
      ],
      "type": "object"
    },
    "name": "voxelite_comments_reply",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "message_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "thread_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability",
            "thread_id",
            "message_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Resolve an anchored discussion; idempotent if already resolved. Preserves messages and anchor; undoable.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "thread_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "thread_id"
      ],
      "type": "object"
    },
    "name": "voxelite_comments_resolve",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Create a revision-zero document and visible unlocked Base layer. Default bounds [0,0,0]..[32,32,32]. Returns model/layer IDs. Up to eight documents per session; never replaces an open model.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "bounds": {
          "additionalProperties": false,
          "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
          "properties": {
            "max": {
              "items": {
                "maximum": 32768,
                "minimum": -32767,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "min": {
              "items": {
                "maximum": 32767,
                "minimum": -32768,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "type": "object"
        },
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "name": {
          "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "name"
      ],
      "type": "object"
    },
    "name": "voxelite_document_create",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "bounds": {
              "additionalProperties": true,
              "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
              "properties": {
                "max": {
                  "items": {
                    "maximum": 32768,
                    "minimum": -32767,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "min": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "type": "object"
            },
            "comments": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "dirty": {
              "type": "boolean"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "layers": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "id": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "locked": {
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "visible": {
                    "type": "boolean"
                  },
                  "voxel_count": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "visible",
                  "locked",
                  "voxel_count"
                ],
                "type": "object"
              },
              "maxItems": 64,
              "minItems": 1,
              "type": "array"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "name": {
              "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
              "type": "string"
            },
            "palette_slots": {
              "maximum": 256,
              "minimum": 1,
              "type": "integer"
            },
            "redo_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "versions": {
              "maximum": 64,
              "minimum": 0,
              "type": "integer"
            },
            "voxel_count": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "name",
            "bounds",
            "layers",
            "dirty",
            "voxel_count",
            "palette_slots",
            "comments",
            "versions",
            "head_id",
            "redo_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "Read document identity, bounds, layers, counts, dirty state and current revision. Optional revision must equal the live revision; no UI state is used.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        }
      },
      "required": [
        "model_id"
      ],
      "type": "object"
    },
    "name": "voxelite_document_info",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "bounds": {
              "additionalProperties": true,
              "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
              "properties": {
                "max": {
                  "items": {
                    "maximum": 32768,
                    "minimum": -32767,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "min": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "type": "object"
            },
            "comments": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "dirty": {
              "type": "boolean"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "layers": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "id": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "locked": {
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "visible": {
                    "type": "boolean"
                  },
                  "voxel_count": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "visible",
                  "locked",
                  "voxel_count"
                ],
                "type": "object"
              },
              "maxItems": 64,
              "minItems": 1,
              "type": "array"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "name": {
              "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
              "type": "string"
            },
            "palette_slots": {
              "maximum": 256,
              "minimum": 1,
              "type": "integer"
            },
            "redo_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "versions": {
              "maximum": 64,
              "minimum": 0,
              "type": "integer"
            },
            "voxel_count": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "name",
            "bounds",
            "layers",
            "dirty",
            "voxel_count",
            "palette_slots",
            "comments",
            "versions",
            "head_id",
            "redo_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Open a canonical .voxl file relative to the configured project root, preserving IDs, comments, versions and unknown metadata. Validation finishes before installation. Duplicate model IDs reject.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "path": {
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "path"
      ],
      "type": "object"
    },
    "name": "voxelite_document_open",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "bounds": {
              "additionalProperties": true,
              "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
              "properties": {
                "max": {
                  "items": {
                    "maximum": 32768,
                    "minimum": -32767,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "min": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "type": "object"
            },
            "comments": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "dirty": {
              "type": "boolean"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "layers": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "id": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "locked": {
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "visible": {
                    "type": "boolean"
                  },
                  "voxel_count": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "visible",
                  "locked",
                  "voxel_count"
                ],
                "type": "object"
              },
              "maxItems": 64,
              "minItems": 1,
              "type": "array"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "name": {
              "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
              "type": "string"
            },
            "palette_slots": {
              "maximum": 256,
              "minimum": 1,
              "type": "integer"
            },
            "redo_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "versions": {
              "maximum": 64,
              "minimum": 0,
              "type": "integer"
            },
            "voxel_count": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "name",
            "bounds",
            "layers",
            "dirty",
            "voxel_count",
            "palette_slots",
            "comments",
            "versions",
            "head_id",
            "redo_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Atomically save .voxl under the project root. New paths must not exist; overwriting the same opened/saved path checks its last SHA-256. Does not create an undo entry. Changes stay in memory until saved.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "path": {
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "path"
      ],
      "type": "object"
    },
    "name": "voxelite_document_save",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "bytes": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "dirty": {
              "const": false
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "path": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "sha256": {
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            }
          },
          "required": [
            "model_id",
            "revision",
            "path",
            "bytes",
            "sha256",
            "dirty"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Export deterministic GLB of the highest visible layer at each occupied coordinate. Atomically write a new path under project root; existing paths reject. Returns size and SHA-256; document/history unchanged.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "path": {
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        }
      },
      "required": [
        "model_id",
        "path"
      ],
      "type": "object"
    },
    "name": "voxelite_export_glb",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "bytes": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "mime_type": {
              "const": "model/gltf-binary"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "path": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "sha256": {
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            }
          },
          "required": [
            "model_id",
            "revision",
            "path",
            "bytes",
            "sha256",
            "mime_type"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Render and atomically write one PNG under project root. Default contact sheet; for individual image use one view. Existing paths reject. Returns size, SHA-256 and camera metadata; document/history unchanged.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "if": {
        "properties": {
          "image_mode": {
            "const": "individual"
          }
        },
        "required": [
          "image_mode"
        ]
      },
      "not": {
        "anyOf": [
          {
            "required": [
              "views"
            ]
          },
          {
            "required": [
              "perspective"
            ]
          }
        ],
        "required": [
          "camera"
        ]
      },
      "properties": {
        "background": {
          "items": {
            "maximum": 255,
            "minimum": 0,
            "type": "integer"
          },
          "maxItems": 4,
          "minItems": 4,
          "type": "array"
        },
        "camera": {
          "additionalProperties": false,
          "oneOf": [
            {
              "not": {
                "required": [
                  "fov_y_degrees"
                ]
              },
              "properties": {
                "projection": {
                  "const": "orthographic"
                }
              },
              "required": [
                "ortho_height"
              ]
            },
            {
              "not": {
                "required": [
                  "ortho_height"
                ]
              },
              "properties": {
                "projection": {
                  "const": "perspective"
                }
              },
              "required": [
                "fov_y_degrees"
              ]
            }
          ],
          "properties": {
            "eye": {
              "items": {
                "maximum": 1000000000.0,
                "minimum": -1000000000.0,
                "type": "number"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "fov_y_degrees": {
              "exclusiveMaximum": 179,
              "exclusiveMinimum": 1,
              "type": "number"
            },
            "ortho_height": {
              "exclusiveMinimum": 0,
              "maximum": 1000000000.0,
              "type": "number"
            },
            "projection": {
              "enum": [
                "orthographic",
                "perspective"
              ],
              "type": "string"
            },
            "target": {
              "items": {
                "maximum": 1000000000.0,
                "minimum": -1000000000.0,
                "type": "number"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "up": {
              "items": {
                "maximum": 1000000000.0,
                "minimum": -1000000000.0,
                "type": "number"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "eye",
            "target",
            "up",
            "projection"
          ],
          "type": "object"
        },
        "height": {
          "maximum": 1024,
          "minimum": 1,
          "type": "integer"
        },
        "image_mode": {
          "enum": [
            "contact_sheet",
            "individual"
          ],
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "path": {
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "perspective": {
          "type": "boolean"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "views": {
          "items": {
            "enum": [
              "iso",
              "front",
              "back",
              "left",
              "right",
              "top"
            ],
            "type": "string"
          },
          "maxItems": 6,
          "minItems": 1,
          "type": "array"
        },
        "width": {
          "maximum": 1024,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "model_id",
        "path"
      ],
      "then": {
        "anyOf": [
          {
            "required": [
              "camera"
            ]
          },
          {
            "properties": {
              "views": {
                "maxItems": 1
              }
            },
            "required": [
              "views"
            ]
          }
        ]
      },
      "type": "object"
    },
    "name": "voxelite_export_png",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "backend": {
              "const": "cpu"
            },
            "bounds": {
              "additionalProperties": true,
              "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
              "properties": {
                "max": {
                  "items": {
                    "maximum": 32768,
                    "minimum": -32767,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "min": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "type": "object"
            },
            "bytes": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "image_mode": {
              "enum": [
                "contact_sheet",
                "individual",
                "both"
              ],
              "type": "string"
            },
            "images": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "bytes": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "height": {
                    "maximum": 2048,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "sha256": {
                    "pattern": "^[0-9a-f]{64}$",
                    "type": "string"
                  },
                  "view": {
                    "enum": [
                      "iso",
                      "front",
                      "back",
                      "left",
                      "right",
                      "top",
                      "camera",
                      "contact_sheet"
                    ],
                    "type": "string"
                  },
                  "width": {
                    "maximum": 2048,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "view",
                  "width",
                  "height",
                  "sha256",
                  "bytes"
                ],
                "type": "object"
              },
              "maxItems": 7,
              "minItems": 1,
              "type": "array"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "path": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "sha256": {
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            "views": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "bytes": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "camera": {
                    "additionalProperties": true,
                    "oneOf": [
                      {
                        "not": {
                          "required": [
                            "fov_y_degrees"
                          ]
                        },
                        "properties": {
                          "projection": {
                            "const": "orthographic"
                          }
                        },
                        "required": [
                          "ortho_height"
                        ]
                      },
                      {
                        "not": {
                          "required": [
                            "ortho_height"
                          ]
                        },
                        "properties": {
                          "projection": {
                            "const": "perspective"
                          }
                        },
                        "required": [
                          "fov_y_degrees"
                        ]
                      }
                    ],
                    "properties": {
                      "eye": {
                        "items": {
                          "maximum": 1000000000.0,
                          "minimum": -1000000000.0,
                          "type": "number"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      },
                      "fov_y_degrees": {
                        "exclusiveMaximum": 179,
                        "exclusiveMinimum": 1,
                        "type": "number"
                      },
                      "ortho_height": {
                        "exclusiveMinimum": 0,
                        "maximum": 1000000000.0,
                        "type": "number"
                      },
                      "projection": {
                        "enum": [
                          "orthographic",
                          "perspective"
                        ],
                        "type": "string"
                      },
                      "target": {
                        "items": {
                          "maximum": 1000000000.0,
                          "minimum": -1000000000.0,
                          "type": "number"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      },
                      "up": {
                        "items": {
                          "maximum": 1000000000.0,
                          "minimum": -1000000000.0,
                          "type": "number"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "eye",
                      "target",
                      "up",
                      "projection"
                    ],
                    "type": "object"
                  },
                  "height": {
                    "maximum": 2048,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "sha256": {
                    "pattern": "^[0-9a-f]{64}$",
                    "type": "string"
                  },
                  "view": {
                    "enum": [
                      "iso",
                      "front",
                      "back",
                      "left",
                      "right",
                      "top",
                      "camera",
                      "contact_sheet"
                    ],
                    "type": "string"
                  },
                  "width": {
                    "maximum": 2048,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "view",
                  "width",
                  "height",
                  "sha256",
                  "bytes",
                  "camera"
                ],
                "type": "object"
              },
              "maxItems": 6,
              "minItems": 1,
              "type": "array"
            }
          },
          "required": [
            "model_id",
            "revision",
            "path",
            "bytes",
            "sha256",
            "backend",
            "bounds",
            "views",
            "images",
            "image_mode"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "Read chronological applied history with agent origins, tool names, labels and change summaries. Includes exact undo/redo entry IDs. Default page 50, max 200; history is bounded and resets on reopen.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "limit": {
          "maximum": 200,
          "minimum": 1,
          "type": "integer"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "offset": {
          "maximum": 1048576,
          "minimum": 0,
          "type": "integer"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        }
      },
      "required": [
        "model_id"
      ],
      "type": "object"
    },
    "name": "voxelite_history_read",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "entries": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "added": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "base_revision": {
                    "description": "Captured monotonic revision, encoded as a decimal u64 string.",
                    "pattern": "^(0|[1-9][0-9]{0,19})$",
                    "type": "string"
                  },
                  "changed_bounds": {
                    "anyOf": [
                      {
                        "additionalProperties": true,
                        "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                        "properties": {
                          "max": {
                            "items": {
                              "maximum": 32768,
                              "minimum": -32767,
                              "type": "integer"
                            },
                            "maxItems": 3,
                            "minItems": 3,
                            "type": "array"
                          },
                          "min": {
                            "items": {
                              "maximum": 32767,
                              "minimum": -32768,
                              "type": "integer"
                            },
                            "maxItems": 3,
                            "minItems": 3,
                            "type": "array"
                          }
                        },
                        "required": [
                          "min",
                          "max"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "entry_id": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "label": {
                    "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "origin": {
                    "enum": [
                      "agent",
                      "human"
                    ],
                    "type": "string"
                  },
                  "recolored": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "removed": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "result_revision": {
                    "description": "Captured monotonic revision, encoded as a decimal u64 string.",
                    "pattern": "^(0|[1-9][0-9]{0,19})$",
                    "type": "string"
                  },
                  "tool": {
                    "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  }
                },
                "required": [
                  "entry_id",
                  "origin",
                  "tool",
                  "label",
                  "base_revision",
                  "result_revision",
                  "added",
                  "removed",
                  "recolored",
                  "changed_bounds"
                ],
                "type": "object"
              },
              "maxItems": 200,
              "minItems": 0,
              "type": "array"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "history_bytes": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "initial_retained": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "next_offset": {
              "anyOf": [
                {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "redo_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "total": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "entries",
            "total",
            "next_offset",
            "head_id",
            "redo_id",
            "initial_retained",
            "history_bytes"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Redo exactly the expected redo entry. Requires captured epoch/revision/entry_id. A new edit clears the redo branch; stale IDs reject.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "entry_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "entry_id"
      ],
      "type": "object"
    },
    "name": "voxelite_history_redo",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "redo_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability",
            "redo_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Undo exactly the expected top entry. Requires captured epoch/revision/entry_id; intervening edits reject. Revision increases monotonically; original entry retains its agent attribution.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "entry_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "entry_id"
      ],
      "type": "object"
    },
    "name": "voxelite_history_undo",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "redo_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability",
            "redo_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Insert an empty layer at bottom-to-top index (default append). Optional layer_id supports deterministic references. Maximum 64 layers.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "index": {
          "maximum": 64,
          "minimum": 0,
          "type": "integer"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "name": {
          "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "name"
      ],
      "type": "object"
    },
    "name": "voxelite_layers_add",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "layer_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability",
            "layer_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "List stable layer IDs, exact names, visibility, lock state and stored voxel counts in bottom-to-top order.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        }
      },
      "required": [
        "model_id"
      ],
      "type": "object"
    },
    "name": "voxelite_layers_list",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "layers": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "id": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "locked": {
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "visible": {
                    "type": "boolean"
                  },
                  "voxel_count": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "visible",
                  "locked",
                  "voxel_count"
                ],
                "type": "object"
              },
              "maxItems": 64,
              "minItems": 1,
              "type": "array"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            }
          },
          "required": [
            "model_id",
            "revision",
            "layers"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Set lock explicitly. Unlock in a separate operation before voxel editing; all mutations share the core lock rules and history.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "locked": {
          "type": "boolean"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "layer",
        "locked"
      ],
      "type": "object"
    },
    "name": "voxelite_layers_lock",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Delete one unlocked layer and its voxels as one undoable edit. Final-layer deletion rejects; anchored comments remain and may become orphaned.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "layer"
      ],
      "type": "object"
    },
    "name": "voxelite_layers_remove",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Rename a layer without changing its stable ID. Duplicate names are allowed, but future name-based access must be unambiguous.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "name": {
          "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "layer",
        "name"
      ],
      "type": "object"
    },
    "name": "voxelite_layers_rename",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Set an exact bottom-to-top permutation of all layer IDs/names. The highest visible layer wins at overlaps; omitted or duplicate layers reject.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "order": {
          "items": {
            "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
            "type": "string"
          },
          "maxItems": 64,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "order"
      ],
      "type": "object"
    },
    "name": "voxelite_layers_reorder",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Set visibility explicitly. Hidden cells stay stored and cannot be edited until made visible. Metadata changes are undoable.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "visible": {
          "type": "boolean"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "layer",
        "visible"
      ],
      "type": "object"
    },
    "name": "voxelite_layers_visibility",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Append exact preset colors into unused slots without recoloring existing voxels. Returns source-to-new slot mapping. Rejects atomically if capacity would exceed 256; originals are immutable.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "preset": {
          "enum": [
            "pico8",
            "endesga32",
            "sweetie16",
            "grayscale",
            "neutral",
            "warm",
            "vivid"
          ],
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "preset"
      ],
      "type": "object"
    },
    "name": "voxelite_palette_apply_preset",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "slot_mapping": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "slot": {
                    "maximum": 256,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "source": {
                    "maximum": 256,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "source",
                  "slot"
                ],
                "type": "object"
              },
              "maxItems": 256,
              "minItems": 1,
              "type": "array"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability",
            "slot_mapping"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "Return palette as .hex or .gpl text in display order; GPL preserves representable names. Read-only, no filesystem side effects.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "format": {
          "enum": [
            "hex",
            "gpl"
          ],
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        }
      },
      "required": [
        "model_id",
        "format"
      ],
      "type": "object"
    },
    "name": "voxelite_palette_export",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "format": {
              "enum": [
                "hex",
                "gpl"
              ],
              "type": "string"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "text": {
              "maxLength": 65536,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "model_id",
            "revision",
            "text",
            "format"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Append colors from bounded .hex or .gpl text into unused slots; no implicit geometry recoloring. Returns source-to-new mapping; malformed input or insufficient capacity leaves palette unchanged.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "format": {
          "enum": [
            "hex",
            "gpl"
          ],
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "text": {
          "maxLength": 65536,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "format",
        "text"
      ],
      "type": "object"
    },
    "name": "voxelite_palette_import",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "slot_mapping": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "slot": {
                    "maximum": 256,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "source": {
                    "maximum": 256,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "source",
                  "slot"
                ],
                "type": "object"
              },
              "maxItems": 256,
              "minItems": 1,
              "type": "array"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability",
            "slot_mapping"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "List stable palette slots, names, RGBA colors, display order and exact preset names. Slot 0 is reserved for air.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        }
      },
      "required": [
        "model_id"
      ],
      "type": "object"
    },
    "name": "voxelite_palette_list",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette": {
              "additionalProperties": true,
              "properties": {
                "order": {
                  "items": {
                    "maximum": 256,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "maxItems": 256,
                  "minItems": 1,
                  "type": "array"
                },
                "slots": {
                  "items": {
                    "additionalProperties": true,
                    "properties": {
                      "index": {
                        "maximum": 256,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "name": {
                        "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                        "maxLength": 128,
                        "minLength": 1,
                        "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                        "type": "string"
                      },
                      "rgba": {
                        "description": "Opaque sRGB RGBA8; alpha must equal 255.",
                        "items": false,
                        "maxItems": 4,
                        "minItems": 4,
                        "prefixItems": [
                          {
                            "maximum": 255,
                            "minimum": 0,
                            "type": "integer"
                          },
                          {
                            "maximum": 255,
                            "minimum": 0,
                            "type": "integer"
                          },
                          {
                            "maximum": 255,
                            "minimum": 0,
                            "type": "integer"
                          },
                          {
                            "const": 255
                          }
                        ],
                        "type": "array"
                      }
                    },
                    "required": [
                      "index",
                      "rgba"
                    ],
                    "type": "object"
                  },
                  "maxItems": 256,
                  "minItems": 1,
                  "type": "array"
                }
              },
              "required": [
                "slots",
                "order"
              ],
              "type": "object"
            },
            "presets": {
              "items": {
                "maxLength": 32,
                "minLength": 1,
                "type": "string"
              },
              "maxItems": 7,
              "minItems": 1,
              "type": "array"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            }
          },
          "required": [
            "model_id",
            "revision",
            "palette",
            "presets"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Add or replace stable slot 1..256 with opaque RGBA. Existing references change appearance, including locked layers. Omitted name creates an unnamed swatch. One undoable edit.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "name": {
          "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "rgba": {
          "description": "Opaque sRGB RGBA8; alpha must equal 255.",
          "items": false,
          "maxItems": 4,
          "minItems": 4,
          "prefixItems": [
            {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            {
              "const": 255
            }
          ],
          "type": "array"
        },
        "slot": {
          "maximum": 256,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "slot",
        "rgba"
      ],
      "type": "object"
    },
    "name": "voxelite_palette_set_slot",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "Query bounds, counts or paged occupied voxels within a half-open region. view=layers (default) counts overlaps separately; composite uses highest visible layer. Optional layer restricts stored-layer queries. limit defaults 1000, max 10000. Use returned revision with next_offset to prevent mixed pages.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "not": {
        "properties": {
          "view": {
            "const": "composite"
          }
        },
        "required": [
          "view",
          "layer"
        ]
      },
      "properties": {
        "kind": {
          "enum": [
            "bounds",
            "counts",
            "voxels"
          ],
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "limit": {
          "maximum": 10000,
          "minimum": 1,
          "type": "integer"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "offset": {
          "maximum": 1048576,
          "minimum": 0,
          "type": "integer"
        },
        "region": {
          "additionalProperties": false,
          "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
          "properties": {
            "max": {
              "items": {
                "maximum": 32768,
                "minimum": -32767,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "min": {
              "items": {
                "maximum": 32767,
                "minimum": -32768,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "type": "object"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "view": {
          "enum": [
            "layers",
            "composite"
          ],
          "type": "string"
        }
      },
      "required": [
        "model_id",
        "kind"
      ],
      "type": "object"
    },
    "name": "voxelite_query",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "bounds": {
              "additionalProperties": true,
              "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
              "properties": {
                "max": {
                  "items": {
                    "maximum": 32768,
                    "minimum": -32767,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "min": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "type": "object"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "next_offset": {
              "anyOf": [
                {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occupied_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "region": {
              "additionalProperties": true,
              "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
              "properties": {
                "max": {
                  "items": {
                    "maximum": 32768,
                    "minimum": -32767,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "min": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "type": "object"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "slots": {
              "additionalProperties": {
                "maximum": 9223372036854775807,
                "minimum": 0,
                "type": "integer"
              },
              "propertyNames": {
                "pattern": "^[0-9]{1,3}$"
              },
              "type": "object"
            },
            "view": {
              "enum": [
                "layers",
                "composite"
              ],
              "type": "string"
            },
            "voxel_count": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "voxels": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "at": {
                    "items": {
                      "maximum": 32767,
                      "minimum": -32768,
                      "type": "integer"
                    },
                    "maxItems": 3,
                    "minItems": 3,
                    "type": "array"
                  },
                  "layer_id": {
                    "anyOf": [
                      {
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "slot": {
                    "maximum": 256,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "layer_id",
                  "at",
                  "slot"
                ],
                "type": "object"
              },
              "maxItems": 10000,
              "minItems": 0,
              "type": "array"
            }
          },
          "required": [
            "model_id",
            "revision",
            "bounds",
            "region",
            "occupied_bounds",
            "voxel_count",
            "view"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "Render CPU PNG image content from one immutable revision. Default four views [iso,front,right,back] at 512², transparent background, orthographic, 2x AA, labeled contact sheet. Up to six views or one explicit camera; <=4,194,304 combined image/sheet pixels. image_mode=contact_sheet|individual|both. Returns camera metadata and hashes; no GPU/display required.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "not": {
        "anyOf": [
          {
            "required": [
              "views"
            ]
          },
          {
            "required": [
              "perspective"
            ]
          }
        ],
        "required": [
          "camera"
        ]
      },
      "properties": {
        "background": {
          "items": {
            "maximum": 255,
            "minimum": 0,
            "type": "integer"
          },
          "maxItems": 4,
          "minItems": 4,
          "type": "array"
        },
        "camera": {
          "additionalProperties": false,
          "oneOf": [
            {
              "not": {
                "required": [
                  "fov_y_degrees"
                ]
              },
              "properties": {
                "projection": {
                  "const": "orthographic"
                }
              },
              "required": [
                "ortho_height"
              ]
            },
            {
              "not": {
                "required": [
                  "ortho_height"
                ]
              },
              "properties": {
                "projection": {
                  "const": "perspective"
                }
              },
              "required": [
                "fov_y_degrees"
              ]
            }
          ],
          "properties": {
            "eye": {
              "items": {
                "maximum": 1000000000.0,
                "minimum": -1000000000.0,
                "type": "number"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "fov_y_degrees": {
              "exclusiveMaximum": 179,
              "exclusiveMinimum": 1,
              "type": "number"
            },
            "ortho_height": {
              "exclusiveMinimum": 0,
              "maximum": 1000000000.0,
              "type": "number"
            },
            "projection": {
              "enum": [
                "orthographic",
                "perspective"
              ],
              "type": "string"
            },
            "target": {
              "items": {
                "maximum": 1000000000.0,
                "minimum": -1000000000.0,
                "type": "number"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "up": {
              "items": {
                "maximum": 1000000000.0,
                "minimum": -1000000000.0,
                "type": "number"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "eye",
            "target",
            "up",
            "projection"
          ],
          "type": "object"
        },
        "height": {
          "maximum": 1024,
          "minimum": 1,
          "type": "integer"
        },
        "image_mode": {
          "enum": [
            "contact_sheet",
            "individual",
            "both"
          ],
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "perspective": {
          "type": "boolean"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "views": {
          "items": {
            "enum": [
              "iso",
              "front",
              "back",
              "left",
              "right",
              "top"
            ],
            "type": "string"
          },
          "maxItems": 6,
          "minItems": 1,
          "type": "array"
        },
        "width": {
          "maximum": 1024,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "model_id"
      ],
      "type": "object"
    },
    "name": "voxelite_render",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "backend": {
              "const": "cpu"
            },
            "bounds": {
              "additionalProperties": true,
              "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
              "properties": {
                "max": {
                  "items": {
                    "maximum": 32768,
                    "minimum": -32767,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "min": {
                  "items": {
                    "maximum": 32767,
                    "minimum": -32768,
                    "type": "integer"
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "type": "object"
            },
            "image_mode": {
              "enum": [
                "contact_sheet",
                "individual",
                "both"
              ],
              "type": "string"
            },
            "images": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "bytes": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "height": {
                    "maximum": 2048,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "sha256": {
                    "pattern": "^[0-9a-f]{64}$",
                    "type": "string"
                  },
                  "view": {
                    "enum": [
                      "iso",
                      "front",
                      "back",
                      "left",
                      "right",
                      "top",
                      "camera",
                      "contact_sheet"
                    ],
                    "type": "string"
                  },
                  "width": {
                    "maximum": 2048,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "view",
                  "width",
                  "height",
                  "sha256",
                  "bytes"
                ],
                "type": "object"
              },
              "maxItems": 7,
              "minItems": 1,
              "type": "array"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "views": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "bytes": {
                    "maximum": 9223372036854775807,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "camera": {
                    "additionalProperties": true,
                    "oneOf": [
                      {
                        "not": {
                          "required": [
                            "fov_y_degrees"
                          ]
                        },
                        "properties": {
                          "projection": {
                            "const": "orthographic"
                          }
                        },
                        "required": [
                          "ortho_height"
                        ]
                      },
                      {
                        "not": {
                          "required": [
                            "ortho_height"
                          ]
                        },
                        "properties": {
                          "projection": {
                            "const": "perspective"
                          }
                        },
                        "required": [
                          "fov_y_degrees"
                        ]
                      }
                    ],
                    "properties": {
                      "eye": {
                        "items": {
                          "maximum": 1000000000.0,
                          "minimum": -1000000000.0,
                          "type": "number"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      },
                      "fov_y_degrees": {
                        "exclusiveMaximum": 179,
                        "exclusiveMinimum": 1,
                        "type": "number"
                      },
                      "ortho_height": {
                        "exclusiveMinimum": 0,
                        "maximum": 1000000000.0,
                        "type": "number"
                      },
                      "projection": {
                        "enum": [
                          "orthographic",
                          "perspective"
                        ],
                        "type": "string"
                      },
                      "target": {
                        "items": {
                          "maximum": 1000000000.0,
                          "minimum": -1000000000.0,
                          "type": "number"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      },
                      "up": {
                        "items": {
                          "maximum": 1000000000.0,
                          "minimum": -1000000000.0,
                          "type": "number"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "eye",
                      "target",
                      "up",
                      "projection"
                    ],
                    "type": "object"
                  },
                  "height": {
                    "maximum": 2048,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "sha256": {
                    "pattern": "^[0-9a-f]{64}$",
                    "type": "string"
                  },
                  "view": {
                    "enum": [
                      "iso",
                      "front",
                      "back",
                      "left",
                      "right",
                      "top",
                      "camera",
                      "contact_sheet"
                    ],
                    "type": "string"
                  },
                  "width": {
                    "maximum": 2048,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "view",
                  "width",
                  "height",
                  "sha256",
                  "bytes",
                  "camera"
                ],
                "type": "object"
              },
              "maxItems": 6,
              "minItems": 1,
              "type": "array"
            }
          },
          "required": [
            "model_id",
            "revision",
            "backend",
            "bounds",
            "views",
            "images",
            "image_mode"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "List named version IDs, names, parent IDs, origin and immutable content hashes. Persistent across save/open; independent of undo retention. Never includes full voxel snapshots.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        }
      },
      "required": [
        "model_id"
      ],
      "type": "object"
    },
    "name": "voxelite_versions_list",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "versions": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "content_hash": {
                    "pattern": "^[0-9a-f]{64}$",
                    "type": "string"
                  },
                  "id": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "name": {
                    "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "origin": {
                    "enum": [
                      "agent",
                      "human"
                    ],
                    "type": "string"
                  },
                  "parent_id": {
                    "anyOf": [
                      {
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "parent_id",
                  "origin",
                  "content_hash"
                ],
                "type": "object"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            }
          },
          "required": [
            "model_id",
            "revision",
            "versions"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Restore named content as a new undoable edit, keeping the version library. Requires expected_head_id (null for empty history) in addition to revision/epoch. Core validates current locks before installation.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_head_id": {
          "anyOf": [
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "version_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "version_id",
        "expected_head_id"
      ],
      "type": "object"
    },
    "name": "voxelite_versions_restore",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Persist current content as a named immutable snapshot with agent attribution and content hash. Up to 64 versions, no recursive libraries. One undoable library edit; save document to retain across process restarts.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "name": {
          "description": "Nonempty text, at most 128 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "parent_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "version_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "name"
      ],
      "type": "object"
    },
    "name": "voxelite_versions_save",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "version_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability",
            "version_id"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Apply 1..256 ordered voxel operations atomically to one model: set, erase_region, fill, box. Each operation names its own layer/mirror; nesting and I/O are forbidden. Later operations see earlier edits; any failure rolls back all; one revision and undo entry.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operations": {
          "items": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "kind": {
                    "const": "set"
                  },
                  "layer": {
                    "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "mirror": {
                    "additionalProperties": false,
                    "properties": {
                      "axes": {
                        "items": {
                          "enum": [
                            "x",
                            "y",
                            "z"
                          ],
                          "type": "string"
                        },
                        "maxItems": 3,
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "plane2": {
                        "items": {
                          "maximum": 65536,
                          "minimum": -65536,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "axes",
                      "plane2"
                    ],
                    "type": "object"
                  },
                  "mode": {
                    "enum": [
                      "place",
                      "paint"
                    ],
                    "type": "string"
                  },
                  "voxels": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "at": {
                          "items": {
                            "maximum": 32767,
                            "minimum": -32768,
                            "type": "integer"
                          },
                          "maxItems": 3,
                          "minItems": 3,
                          "type": "array"
                        },
                        "slot": {
                          "anyOf": [
                            {
                              "maximum": 256,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            }
                          ],
                          "description": "Stable slot number or unique swatch name; zero is air for explicit writes only."
                        }
                      },
                      "required": [
                        "at",
                        "slot"
                      ],
                      "type": "object"
                    },
                    "maxItems": 65536,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "layer",
                  "voxels",
                  "kind"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "kind": {
                    "const": "erase_region"
                  },
                  "layer": {
                    "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "mirror": {
                    "additionalProperties": false,
                    "properties": {
                      "axes": {
                        "items": {
                          "enum": [
                            "x",
                            "y",
                            "z"
                          ],
                          "type": "string"
                        },
                        "maxItems": 3,
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "plane2": {
                        "items": {
                          "maximum": 65536,
                          "minimum": -65536,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "axes",
                      "plane2"
                    ],
                    "type": "object"
                  },
                  "region": {
                    "additionalProperties": false,
                    "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                    "properties": {
                      "max": {
                        "items": {
                          "maximum": 32768,
                          "minimum": -32767,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      },
                      "min": {
                        "items": {
                          "maximum": 32767,
                          "minimum": -32768,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "min",
                      "max"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "layer",
                  "region",
                  "kind"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "cap": {
                    "maximum": 1048576,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "kind": {
                    "const": "fill"
                  },
                  "layer": {
                    "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "mirror": {
                    "additionalProperties": false,
                    "properties": {
                      "axes": {
                        "items": {
                          "enum": [
                            "x",
                            "y",
                            "z"
                          ],
                          "type": "string"
                        },
                        "maxItems": 3,
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "plane2": {
                        "items": {
                          "maximum": 65536,
                          "minimum": -65536,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "axes",
                      "plane2"
                    ],
                    "type": "object"
                  },
                  "region": {
                    "additionalProperties": false,
                    "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                    "properties": {
                      "max": {
                        "items": {
                          "maximum": 32768,
                          "minimum": -32767,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      },
                      "min": {
                        "items": {
                          "maximum": 32767,
                          "minimum": -32768,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "min",
                      "max"
                    ],
                    "type": "object"
                  },
                  "seed": {
                    "items": {
                      "maximum": 32767,
                      "minimum": -32768,
                      "type": "integer"
                    },
                    "maxItems": 3,
                    "minItems": 3,
                    "type": "array"
                  },
                  "slot": {
                    "anyOf": [
                      {
                        "maximum": 256,
                        "minimum": 1,
                        "type": "integer"
                      },
                      {
                        "maxLength": 128,
                        "minLength": 1,
                        "type": "string"
                      }
                    ],
                    "description": "Stable slot number or unique swatch name; zero is air for explicit writes only."
                  }
                },
                "required": [
                  "layer",
                  "seed",
                  "slot",
                  "kind"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "else": {
                  "required": [
                    "slot"
                  ]
                },
                "if": {
                  "properties": {
                    "mode": {
                      "const": "erase"
                    }
                  },
                  "required": [
                    "mode"
                  ]
                },
                "properties": {
                  "hollow": {
                    "type": "boolean"
                  },
                  "kind": {
                    "const": "box"
                  },
                  "layer": {
                    "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
                    "type": "string"
                  },
                  "mirror": {
                    "additionalProperties": false,
                    "properties": {
                      "axes": {
                        "items": {
                          "enum": [
                            "x",
                            "y",
                            "z"
                          ],
                          "type": "string"
                        },
                        "maxItems": 3,
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "plane2": {
                        "items": {
                          "maximum": 65536,
                          "minimum": -65536,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "axes",
                      "plane2"
                    ],
                    "type": "object"
                  },
                  "mode": {
                    "enum": [
                      "place",
                      "paint",
                      "erase"
                    ],
                    "type": "string"
                  },
                  "region": {
                    "additionalProperties": false,
                    "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                    "properties": {
                      "max": {
                        "items": {
                          "maximum": 32768,
                          "minimum": -32767,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      },
                      "min": {
                        "items": {
                          "maximum": 32767,
                          "minimum": -32768,
                          "type": "integer"
                        },
                        "maxItems": 3,
                        "minItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "min",
                      "max"
                    ],
                    "type": "object"
                  },
                  "slot": {
                    "anyOf": [
                      {
                        "maximum": 256,
                        "minimum": 1,
                        "type": "integer"
                      },
                      {
                        "maxLength": 128,
                        "minLength": 1,
                        "type": "string"
                      }
                    ],
                    "description": "Stable slot number or unique swatch name; zero is air for explicit writes only."
                  }
                },
                "required": [
                  "layer",
                  "region",
                  "kind"
                ],
                "then": {
                  "not": {
                    "required": [
                      "slot"
                    ]
                  }
                },
                "type": "object"
              }
            ]
          },
          "maxItems": 256,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "operations"
      ],
      "type": "object"
    },
    "name": "voxelite_voxels_batch",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Build an integer half-open solid box or one-cell shell (hollow=true). Default mode=place, hollow=false, mirror=none. slot required for place/paint, forbidden for erase. One atomic undo entry.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "else": {
        "required": [
          "slot"
        ]
      },
      "if": {
        "properties": {
          "mode": {
            "const": "erase"
          }
        },
        "required": [
          "mode"
        ]
      },
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "hollow": {
          "type": "boolean"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "mirror": {
          "additionalProperties": false,
          "properties": {
            "axes": {
              "items": {
                "enum": [
                  "x",
                  "y",
                  "z"
                ],
                "type": "string"
              },
              "maxItems": 3,
              "minItems": 0,
              "type": "array",
              "uniqueItems": true
            },
            "plane2": {
              "items": {
                "maximum": 65536,
                "minimum": -65536,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "axes",
            "plane2"
          ],
          "type": "object"
        },
        "mode": {
          "enum": [
            "place",
            "paint",
            "erase"
          ],
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "region": {
          "additionalProperties": false,
          "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
          "properties": {
            "max": {
              "items": {
                "maximum": 32768,
                "minimum": -32767,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "min": {
              "items": {
                "maximum": 32767,
                "minimum": -32768,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "type": "object"
        },
        "slot": {
          "anyOf": [
            {
              "maximum": 256,
              "minimum": 1,
              "type": "integer"
            },
            {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          ],
          "description": "Stable slot number or unique swatch name; zero is air for explicit writes only."
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "layer",
        "region"
      ],
      "then": {
        "not": {
          "required": [
            "slot"
          ]
        }
      },
      "type": "object"
    },
    "name": "voxelite_voxels_box",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Erase occupied cells in min-inclusive/max-exclusive region. Mirror is explicit per call; omitted means none. Invalid/hidden/locked targets reject without partial edits.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "mirror": {
          "additionalProperties": false,
          "properties": {
            "axes": {
              "items": {
                "enum": [
                  "x",
                  "y",
                  "z"
                ],
                "type": "string"
              },
              "maxItems": 3,
              "minItems": 0,
              "type": "array",
              "uniqueItems": true
            },
            "plane2": {
              "items": {
                "maximum": 65536,
                "minimum": -65536,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "axes",
            "plane2"
          ],
          "type": "object"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "region": {
          "additionalProperties": false,
          "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
          "properties": {
            "max": {
              "items": {
                "maximum": 32768,
                "minimum": -32767,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "min": {
              "items": {
                "maximum": 32767,
                "minimum": -32768,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "type": "object"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "layer",
        "region"
      ],
      "type": "object"
    },
    "name": "voxelite_voxels_erase_region",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Six-connected flood fill of the seed's slot, including air. Region defaults to document bounds; cap defaults to 1,048,576 visited cells. Cap exhaustion rejects atomically. Mirror never inherits UI state.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "cap": {
          "maximum": 1048576,
          "minimum": 1,
          "type": "integer"
        },
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "mirror": {
          "additionalProperties": false,
          "properties": {
            "axes": {
              "items": {
                "enum": [
                  "x",
                  "y",
                  "z"
                ],
                "type": "string"
              },
              "maxItems": 3,
              "minItems": 0,
              "type": "array",
              "uniqueItems": true
            },
            "plane2": {
              "items": {
                "maximum": 65536,
                "minimum": -65536,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "axes",
            "plane2"
          ],
          "type": "object"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "region": {
          "additionalProperties": false,
          "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
          "properties": {
            "max": {
              "items": {
                "maximum": 32768,
                "minimum": -32767,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            },
            "min": {
              "items": {
                "maximum": 32767,
                "minimum": -32768,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "type": "object"
        },
        "seed": {
          "items": {
            "maximum": 32767,
            "minimum": -32768,
            "type": "integer"
          },
          "maxItems": 3,
          "minItems": 3,
          "type": "array"
        },
        "slot": {
          "anyOf": [
            {
              "maximum": 256,
              "minimum": 1,
              "type": "integer"
            },
            {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          ],
          "description": "Stable slot number or unique swatch name; zero is air for explicit writes only."
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "layer",
        "seed",
        "slot"
      ],
      "type": "object"
    },
    "name": "voxelite_voxels_fill",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true
    },
    "description": "Read explicit integer coordinates on one layer, including air as slot 0. Returns values in request order. Out-of-bounds coordinates reject the entire read.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "positions": {
          "items": {
            "items": {
              "maximum": 32767,
              "minimum": -32768,
              "type": "integer"
            },
            "maxItems": 3,
            "minItems": 3,
            "type": "array"
          },
          "maxItems": 10000,
          "minItems": 1,
          "type": "array"
        },
        "revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        }
      },
      "required": [
        "model_id",
        "layer",
        "positions"
      ],
      "type": "object"
    },
    "name": "voxelite_voxels_get",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "layer_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "voxels": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "at": {
                    "items": {
                      "maximum": 32767,
                      "minimum": -32768,
                      "type": "integer"
                    },
                    "maxItems": 3,
                    "minItems": 3,
                    "type": "array"
                  },
                  "slot": {
                    "maximum": 256,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "at",
                  "slot"
                ],
                "type": "object"
              },
              "maxItems": 10000,
              "minItems": 1,
              "type": "array"
            }
          },
          "required": [
            "model_id",
            "revision",
            "layer_id",
            "voxels"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  },
  {
    "annotations": {
      "destructiveHint": true,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": false
    },
    "description": "Atomically place or paint explicit cells, at most 65,536. Slot 0 erases; paint affects occupied cells only. Last duplicate wins before mirror expansion; mirror conflicts reject. Omitted mode=place, mirror=none. One undo entry.",
    "inputSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "additionalProperties": false,
      "properties": {
        "expected_epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "expected_revision": {
          "description": "Captured monotonic revision, encoded as a decimal u64 string.",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "type": "string"
        },
        "label": {
          "description": "Nonempty text, at most 80 UTF-8 bytes, without control characters. The byte limit is also checked at runtime.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "layer": {
          "description": "Layer UUID or unique exact name. Never inferred from UI selection.",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
          "type": "string"
        },
        "mirror": {
          "additionalProperties": false,
          "properties": {
            "axes": {
              "items": {
                "enum": [
                  "x",
                  "y",
                  "z"
                ],
                "type": "string"
              },
              "maxItems": 3,
              "minItems": 0,
              "type": "array",
              "uniqueItems": true
            },
            "plane2": {
              "items": {
                "maximum": 65536,
                "minimum": -65536,
                "type": "integer"
              },
              "maxItems": 3,
              "minItems": 3,
              "type": "array"
            }
          },
          "required": [
            "axes",
            "plane2"
          ],
          "type": "object"
        },
        "mode": {
          "enum": [
            "place",
            "paint"
          ],
          "type": "string"
        },
        "model_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "voxels": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "at": {
                "items": {
                  "maximum": 32767,
                  "minimum": -32768,
                  "type": "integer"
                },
                "maxItems": 3,
                "minItems": 3,
                "type": "array"
              },
              "slot": {
                "anyOf": [
                  {
                    "maximum": 256,
                    "minimum": 0,
                    "type": "integer"
                  },
                  {
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                ],
                "description": "Stable slot number or unique swatch name; zero is air for explicit writes only."
              }
            },
            "required": [
              "at",
              "slot"
            ],
            "type": "object"
          },
          "maxItems": 65536,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "expected_epoch",
        "operation_id",
        "model_id",
        "expected_revision",
        "layer",
        "voxels"
      ],
      "type": "object"
    },
    "name": "voxelite_voxels_set",
    "outputSchema": {
      "additionalProperties": false,
      "oneOf": [
        {
          "not": {
            "required": [
              "error"
            ]
          },
          "properties": {
            "ok": {
              "const": true
            }
          },
          "required": [
            "data"
          ]
        },
        {
          "not": {
            "required": [
              "data"
            ]
          },
          "properties": {
            "ok": {
              "const": false
            }
          },
          "required": [
            "error"
          ]
        }
      ],
      "properties": {
        "api_version": {
          "const": "voxelite.v1"
        },
        "data": {
          "additionalProperties": true,
          "properties": {
            "added": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "changed_bounds": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "description": "Integer region: min inclusive, max exclusive. Each extent must be positive and at most 256 cells; checked at runtime.",
                  "properties": {
                    "max": {
                      "items": {
                        "maximum": 32768,
                        "minimum": -32767,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    },
                    "min": {
                      "items": {
                        "maximum": 32767,
                        "minimum": -32768,
                        "type": "integer"
                      },
                      "maxItems": 3,
                      "minItems": 3,
                      "type": "array"
                    }
                  },
                  "required": [
                    "min",
                    "max"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "changed_layers": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 0,
              "type": "array"
            },
            "changed_voxels": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "durability": {
              "const": "memory"
            },
            "head_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metadata_changed": {
              "type": "boolean"
            },
            "model_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "operation_id": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "palette_changed": {
              "type": "boolean"
            },
            "recolored": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "removed": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            "revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "undo_entry_id": {
              "anyOf": [
                {
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "work_units": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "model_id",
            "revision",
            "operation_id",
            "undo_entry_id",
            "head_id",
            "changed_voxels",
            "added",
            "removed",
            "recolored",
            "changed_bounds",
            "changed_layers",
            "palette_changed",
            "metadata_changed",
            "work_units",
            "durability"
          ],
          "type": "object"
        },
        "epoch": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "command_index": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "current_revision": {
              "description": "Captured monotonic revision, encoded as a decimal u64 string.",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "type": "string"
            },
            "message": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "recovery": {
              "maxLength": 4096,
              "minLength": 1,
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "recovery"
          ],
          "type": "object"
        },
        "ok": {
          "type": "boolean"
        },
        "session_id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        }
      },
      "required": [
        "api_version",
        "session_id",
        "epoch",
        "ok"
      ],
      "type": "object"
    }
  }
]
