Raw schema
{
"type": "object",
"properties": {
"document": {
"type": "string",
"maxLength": 64,
"description": "The MCP document capability from rapier.open. Keep it private and pass it to later calls."
},
"operation_id": {
"type": "string",
"maxLength": 128,
"description": "A fresh random id for this call (a UUID works). Resend it only to retry this call; the retry replays the recorded result.",
"minLength": 22,
"pattern": "^[A-Za-z0-9_-]+$"
},
"recipe": {
"type": "object",
"additionalProperties": true,
"description": "A full drawing recipe, as a read returns it."
},
"figures": {
"type": "array",
"maxItems": 128,
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Figures use kind, not type. Example: [{\"kind\":\"rect\",\"id\":\"start\",\"label\":\"Start\"},{\"kind\":\"rect\",\"id\":\"end\",\"label\":\"Finish\"},{\"kind\":\"arrow\",\"from\":\"start\",\"to\":\"end\"}]. Omit x, y, w and h for automatic layout."
},
"direction": {
"type": "string",
"enum": [
"down",
"across",
"up",
"back"
],
"description": "The direction of an automatic figure layout; down by default."
},
"shapes": {
"type": "object",
"properties": {
"add": {
"type": "array",
"maxItems": 128,
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Figures or shapes to add."
},
"replace": {
"type": "array",
"maxItems": 128,
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Complete replacement shapes, each by its id. Copy the inspected shape and change only the intended fields; id and label alone are not a shape."
},
"remove": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^[A-Za-z0-9_-]+$"
},
"minItems": 1,
"maxItems": 128,
"uniqueItems": true,
"description": "The ids to remove."
}
},
"required": [],
"additionalProperties": false,
"description": "A patch to an existing drawing."
},
"operations": {
"type": "array",
"maxItems": 64,
"description": "Edits to existing shapes by id, applied in order.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"group",
"ungroup",
"lock",
"unlock",
"unlockAll",
"delete",
"front",
"back",
"forward",
"backward",
"duplicate",
"align",
"distribute",
"flip",
"move",
"clean",
"unclean",
"set_look",
"set_label",
"set_step"
],
"description": "The operation."
},
"label": {
"type": "string",
"maxLength": 4096,
"description": "set_label: the words of the shape (empty removes them)."
},
"step": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 99,
"description": "set_step: the number a box shows above its words in the order a flow is read, or null for none."
},
"brush": {
"type": "string",
"maxLength": 24,
"description": "set_look: the brush."
},
"style": {
"type": "string",
"maxLength": 16,
"description": "set_look: the fill style."
},
"ink": {
"type": [
"string",
"null"
],
"maxLength": 16,
"description": "set_look: the ink, or null for none."
},
"border": {
"type": [
"string",
"null"
],
"maxLength": 16,
"description": "set_look: the border ink, or null for none."
},
"dash": {
"type": [
"string",
"null"
],
"maxLength": 8,
"description": "set_look: the dash, or null for solid."
},
"ids": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^[A-Za-z0-9_-]+$"
},
"minItems": 1,
"maxItems": 128,
"uniqueItems": true,
"description": "The ids of the shapes it acts on."
},
"group": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "group: the id the new group takes."
},
"dx": {
"type": "number",
"minimum": -65536,
"maximum": 65536,
"description": "move or duplicate: the horizontal offset."
},
"dy": {
"type": "number",
"minimum": -65536,
"maximum": 65536,
"description": "move or duplicate: the vertical offset."
},
"newIds": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^[A-Za-z0-9_-]+$"
},
"minItems": 1,
"maxItems": 128,
"uniqueItems": true,
"description": "duplicate: the ids the copies take."
},
"alignment": {
"type": "string",
"enum": [
"left",
"center",
"right",
"top",
"middle",
"bottom"
],
"description": "align: the edge or centre to line up."
},
"axis": {
"type": "string",
"enum": [
"x",
"y"
],
"description": "distribute or flip: the axis."
}
},
"required": [
"type"
],
"additionalProperties": false
}
},
"recipe_handle": {
"type": "string",
"maxLength": 128,
"description": "Edit: the handle from reading the drawing."
},
"context_handle": {
"type": "string",
"maxLength": 128,
"description": "Create: place the drawing after this block."
},
"alt": {
"type": "string",
"maxLength": 240,
"description": "The caption, as the person reads it (required on create).",
"minLength": 1
},
"label": {
"type": "string",
"maxLength": 120,
"description": "A short name the person sees for this change."
},
"agent": {
"type": "string",
"maxLength": 64,
"description": "This assistant's display name."
}
},
"required": [
"document",
"operation_id"
],
"additionalProperties": false
}