notion-mcp-server

by awkoy
Verified

batch_update_blocks

Update multiple blocks in a single operation

Input Schema

NameRequiredDescriptionDefault
operationsYesArray of update operations to perform in a single batch

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "operations": { "description": "Array of update operations to perform in a single batch", "items": { "additionalProperties": false, "properties": { "blockId": { "description": "The ID of the block to update", "type": "string" }, "data": { "anyOf": [ { "additionalProperties": false, "properties": { "archived": { "description": "Whether block is archived", "type": "boolean" }, "created_time": { "description": "ISO timestamp of block creation", "type": "string" }, "has_children": { "description": "Whether block has child blocks", "type": "boolean" }, "last_edited_time": { "description": "ISO timestamp of last edit", "type": "string" }, "object": { "const": "block", "description": "Object type identifier", "type": "string" }, "paragraph": { "additionalProperties": false, "description": "Paragraph block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text/items/anyOf/0/properties/annotations/properties/color", "description": "Color of the block" }, "rich_text": { "description": "Array of rich text content", "items": { "anyOf": [ { "additionalProperties": false, "description": "Text rich text item request", "properties": { "annotations": { "additionalProperties": false, "description": "Text formatting annotations", "properties": { "bold": { "description": "Whether text is bold", "type": "boolean" }, "code": { "description": "Whether text is code formatted", "type": "boolean" }, "color": { "description": "Color of the text", "enum": [ "default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background" ], "type": "string" }, "italic": { "description": "Whether text is italic", "type": "boolean" }, "strikethrough": { "description": "Whether text has strikethrough", "type": "boolean" }, "underline": { "description": "Whether text is underlined", "type": "boolean" } }, "type": "object" }, "href": { "description": "URL for the link", "type": [ "string", "null" ] }, "plain_text": { "description": "Plain text content without formatting", "type": "string" }, "text": { "additionalProperties": false, "description": "Text content", "properties": { "content": { "description": "The actual text content", "type": "string" }, "link": { "anyOf": [ { "anyOf": [ { "not": {} }, { "additionalProperties": false, "properties": { "url": { "description": "URL for the link", "format": "uri", "type": "string" } }, "required": [ "url" ], "type": "object" } ] }, { "type": "null" } ], "description": "Optional link associated with the text" } }, "required": [ "content" ], "type": "object" }, "type": { "const": "text", "description": "Type of rich text content", "type": "string" } }, "required": [ "type", "text" ], "type": "object" }, { "additionalProperties": false, "description": "Equation rich text item request", "properties": { "annotations": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text/items/anyOf/0/properties/annotations", "description": "Text formatting annotations" }, "equation": { "additionalProperties": false, "description": "Equation content", "properties": { "expression": { "description": "LaTeX equation expression", "type": "string" } }, "required": [ "expression" ], "type": "object" }, "href": { "description": "URL for the link", "type": [ "string", "null" ] }, "plain_text": { "description": "Plain text content without formatting", "type": "string" }, "type": { "const": "equation", "description": "Type of equation content", "type": "string" } }, "required": [ "type", "equation" ], "type": "object" }, { "additionalProperties": false, "description": "Mention rich text item request", "properties": { "annotations": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text/items/anyOf/0/properties/annotations", "description": "Text formatting annotations" }, "href": { "description": "URL for the link", "type": [ "string", "null" ] }, "mention": { "anyOf": [ { "additionalProperties": false, "description": "Schema for a date mention block request", "properties": { "date": { "additionalProperties": false, "description": "Contains the date information", "properties": { "end": { "description": "The optional end date in YYYY-MM-DD format", "type": [ "string", "null" ] }, "start": { "description": "The start date in YYYY-MM-DD format", "type": "string" } }, "required": [ "start" ], "type": "object" }, "type": { "const": "date", "description": "Specifies this is a date mention type", "type": "string" } }, "required": [ "type", "date" ], "type": "object" }, { "additionalProperties": false, "description": "Schema for a user mention block request", "properties": { "type": { "const": "user", "description": "Specifies this is a user mention type", "type": "string" }, "user": { "additionalProperties": false, "description": "Contains the user reference information", "properties": { "id": { "description": "The unique ID that identifies this specific user", "type": "string" }, "object": { "const": "user", "description": "Identifies this object as a user type", "type": "string" } }, "required": [ "id" ], "type": "object" } }, "required": [ "type", "user" ], "type": "object" }, { "additionalProperties": false, "description": "Schema for a page mention block request", "properties": { "page": { "additionalProperties": false, "description": "Contains the page reference information", "properties": { "id": { "description": "The unique ID that identifies this specific page", "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": { "const": "page", "description": "Specifies this is a page mention type", "type": "string" } }, "required": [ "type", "page" ], "type": "object" }, { "additionalProperties": false, "description": "Schema for a database mention block request", "properties": { "database": { "additionalProperties": false, "description": "Contains the database reference information", "properties": { "id": { "description": "The unique ID that identifies this specific database", "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": { "const": "database", "description": "Specifies this is a database mention type", "type": "string" } }, "required": [ "type", "database" ], "type": "object" }, { "additionalProperties": false, "description": "Schema for a template mention user block request", "properties": { "template_mention": { "additionalProperties": false, "description": "Contains the template mention user information", "properties": { "template_mention_user": { "const": "me", "description": "Template mention user value", "type": "string" }, "type": { "const": "template_mention_user", "description": "Specifies this is a template mention user type", "type": "string" } }, "required": [ "type", "template_mention_user" ], "type": "object" }, "type": { "const": "template_mention", "description": "Specifies this is a template mention type", "type": "string" } }, "required": [ "type", "template_mention" ], "type": "object" }, { "additionalProperties": false, "description": "Schema for a template mention date block request", "properties": { "template_mention": { "additionalProperties": false, "description": "Contains the template mention date information", "properties": { "template_mention_date": { "const": "today", "description": "Template mention date value", "type": "string" }, "type": { "const": "template_mention_date", "description": "Specifies this is a template mention date type", "type": "string" } }, "required": [ "type", "template_mention_date" ], "type": "object" }, "type": { "const": "template_mention", "description": "Specifies this is a template mention type", "type": "string" } }, "required": [ "type", "template_mention" ], "type": "object" } ], "description": "Mention content" }, "plain_text": { "description": "Plain text content without formatting", "type": "string" }, "type": { "const": "mention", "description": "Type of mention content", "type": "string" } }, "required": [ "type", "mention" ], "type": "object" } ], "description": "Union of all possible rich text item request types" }, "type": "array" } }, "required": [ "rich_text" ], "type": "object" }, "type": { "const": "paragraph", "description": "Paragraph block type", "type": "string" } }, "required": [ "type", "paragraph" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "heading_1": { "additionalProperties": false, "description": "Heading 1 block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "is_toggleable": { "description": "Whether heading can be toggled", "type": "boolean" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "heading_1", "description": "Heading 1 block type", "type": "string" } }, "required": [ "type", "heading_1" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "heading_2": { "additionalProperties": false, "description": "Heading 2 block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "is_toggleable": { "description": "Whether heading can be toggled", "type": "boolean" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "heading_2", "description": "Heading 2 block type", "type": "string" } }, "required": [ "type", "heading_2" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "heading_3": { "additionalProperties": false, "description": "Heading 3 block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "is_toggleable": { "description": "Whether heading can be toggled", "type": "boolean" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "heading_3", "description": "Heading 3 block type", "type": "string" } }, "required": [ "type", "heading_3" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "quote": { "additionalProperties": false, "description": "Quote block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "type": { "const": "quote", "description": "Quote block type", "type": "string" } }, "required": [ "type", "quote" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "callout": { "additionalProperties": false, "description": "Callout block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "icon": { "additionalProperties": false, "description": "Icon for the callout", "properties": { "emoji": { "type": "string" }, "type": { "const": "emoji", "type": "string" } }, "required": [ "emoji", "type" ], "type": "object" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "callout", "description": "Callout block type", "type": "string" } }, "required": [ "type", "callout" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "toggle": { "additionalProperties": false, "description": "Toggle block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "type": { "const": "toggle", "description": "Toggle block type", "type": "string" } }, "required": [ "type", "toggle" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "bulleted_list_item": { "additionalProperties": false, "description": "Bulleted list item block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "bulleted_list_item", "description": "Bulleted list item block type", "type": "string" } }, "required": [ "type", "bulleted_list_item" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "numbered_list_item": { "additionalProperties": false, "description": "Numbered list item block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "numbered_list_item", "description": "Numbered list item block type", "type": "string" } }, "required": [ "type", "numbered_list_item" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "to_do": { "additionalProperties": false, "description": "To-do block content", "properties": { "checked": { "description": "Whether the to-do is checked", "type": "boolean" }, "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text" ], "type": "object" }, "type": { "const": "to_do", "description": "To-do block type", "type": "string" } }, "required": [ "type", "to_do" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "code": { "additionalProperties": false, "description": "Code block content", "properties": { "color": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/color" }, "language": { "description": "Programming language for code blocks", "enum": [ "abap", "arduino", "bash", "basic", "c", "clojure", "coffeescript", "c++", "c#", "css", "dart", "diff", "docker", "elixir", "elm", "erlang", "flow", "fortran", "f#", "gherkin", "glsl", "go", "graphql", "groovy", "haskell", "html", "java", "javascript", "json", "julia", "kotlin", "latex", "less", "lisp", "livescript", "lua", "makefile", "markdown", "markup", "matlab", "mermaid", "nix", "objective-c", "ocaml", "pascal", "perl", "php", "plain text", "powershell", "prolog", "protobuf", "python", "r", "reason", "ruby", "rust", "sass", "scala", "scheme", "scss", "shell", "sql", "swift", "typescript", "vb.net", "verilog", "vhdl", "visual basic", "webassembly", "xml", "yaml", "java/c/c++/c#" ], "type": "string" }, "rich_text": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text" } }, "required": [ "rich_text", "language" ], "type": "object" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "code", "description": "Code block type", "type": "string" } }, "required": [ "type", "code" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "divider": { "additionalProperties": false, "description": "Divider block content", "properties": {}, "type": "object" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "divider", "description": "Divider block type", "type": "string" } }, "required": [ "type", "divider" ], "type": "object" }, { "additionalProperties": false, "properties": { "archived": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/archived" }, "created_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/created_time" }, "has_children": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/has_children" }, "image": { "additionalProperties": false, "description": "Image block content", "properties": { "caption": { "description": "Image caption", "items": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/paragraph/properties/rich_text/items" }, "type": "array" }, "external": { "additionalProperties": false, "description": "External file source", "properties": { "url": { "description": "URL of the external file", "format": "uri", "type": "string" } }, "required": [ "url" ], "type": "object" }, "type": { "const": "external", "description": "Type of file source", "type": "string" } }, "required": [ "external", "type" ], "type": "object" }, "last_edited_time": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/last_edited_time" }, "object": { "$ref": "#/properties/operations/items/properties/data/anyOf/0/properties/object" }, "type": { "const": "image", "description": "Image block type", "type": "string" } }, "required": [ "type", "image" ], "type": "object" } ], "description": "The block data to update" } }, "required": [ "blockId", "data" ], "type": "object" }, "type": "array" } }, "required": [ "operations" ], "type": "object" }