{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "input": {
      "type": "string",
      "minLength": 1,
      "x-tiwater-file-role": "read", "x-tiwater-document-revision-role": "current"
    },
    "changes": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sourceInput": {
            "type": "string",
            "minLength": 1,
            "x-tiwater-file-role": "read"
          },
          "sources": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "part": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^\\/"
                },
                "path": {
                  "type": "string",
                  "pattern": "^\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\](?:\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\])*$"
                }
              },
              "required": [
                "part",
                "path"
              ],
              "additionalProperties": false
            }
          },
          "targetParent": {
            "type": "object",
            "properties": {
              "part": {
                "type": "string",
                "minLength": 1,
                "pattern": "^\\/"
              },
              "path": {
                "type": "string",
                "pattern": "^\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\](?:\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\])*$"
              }
            },
            "required": [
              "part",
              "path"
            ],
            "additionalProperties": false
          },
          "before": {
            "type": "object",
            "properties": {
              "part": {
                "type": "string",
                "minLength": 1,
                "pattern": "^\\/"
              },
              "path": {
                "type": "string",
                "pattern": "^\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\](?:\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\])*$"
              }
            },
            "required": [
              "part",
              "path"
            ],
            "additionalProperties": false
          },
          "repeat": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          }
        },
        "required": [
          "sourceInput",
          "sources",
          "targetParent"
        ],
        "additionalProperties": false
      }
    },
    "output": {
      "type": "string",
      "minLength": 1,
      "description": "Output DOCX path; may equal input for an atomic in-place update.",
      "x-tiwater-file-role": "write"
    },
    "receiptOutput": {
      "type": "string",
      "minLength": 1,
      "x-tiwater-file-role": "write",
      "x-tiwater-file-effect": false
    }
  },
  "required": [
    "input",
    "changes",
    "output",
    "receiptOutput"
  ],
  "additionalProperties": false,
  "$id": "tiwater.office-mcp-input/docx_insert_objects"
}
