Raw schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Document ID"
},
"mode": {
"description": "suggest: tracked changes (default for documents with 20+ words); apply: edit directly (default for documents under 20 words). Pass apply explicitly to edit a substantial document without suggesting.",
"type": "string",
"enum": [
"apply",
"suggest"
]
},
"edits": {
"minItems": 1,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "replace"
},
"block_id": {
"type": "string",
"description": "Block id anchor (from read_document with_block_ids)"
},
"find": {
"type": "string",
"minLength": 1,
"description": "Exact text to find within the block"
},
"replace": {
"type": "string",
"description": "Replacement content (Markdown by default; HTML is auto-detected)"
},
"format": {
"description": "Replacement format. Omit to auto-detect HTML and otherwise parse Markdown",
"type": "string",
"enum": [
"markdown",
"html"
]
},
"all": {
"description": "Replace every occurrence in the block (default: first only)",
"type": "boolean"
}
},
"required": [
"type",
"block_id",
"find",
"replace"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "insert_markdown"
},
"markdown": {
"type": "string",
"minLength": 1,
"description": "Markdown content to insert"
},
"position": {
"type": "string",
"enum": [
"before",
"after",
"end"
],
"description": "Where to insert relative to block_id, or \"end\" of document"
},
"block_id": {
"description": "Anchor block id (required unless position is \"end\")",
"type": "string"
}
},
"required": [
"type",
"markdown",
"position"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "insert_html"
},
"html": {
"type": "string",
"minLength": 1,
"description": "HTML block content parsed by Revise's native agent parser"
},
"position": {
"type": "string",
"enum": [
"before",
"after",
"end"
],
"description": "Where to insert relative to block_id, or \"end\" of document"
},
"block_id": {
"description": "Anchor block id (required unless position is \"end\")",
"type": "string"
}
},
"required": [
"type",
"html",
"position"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "delete_block"
},
"block_id": {
"type": "string",
"description": "Block id to delete"
}
},
"required": [
"type",
"block_id"
]
}
]
},
"description": "Edits to perform, in order"
}
},
"required": [
"id",
"edits"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}