append-block-children
Add multiple blocks to a parent block or page in Notion by specifying the parent block ID and a list of child blocks. Optionally, insert blocks after a specific existing block using its ID.
Instructions
Append blocks to a parent block
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Optional ID of an existing block to append after | |
| block_id | Yes | ID of the parent block (page or block) | |
| children | Yes | List of block objects to append |
Implementation Reference
- server.js:538-563 (handler)Handler logic for the 'append-block-children' tool. Destructures arguments, cleans block_id and after, constructs params, calls notion.blocks.children.append, and returns the JSON response.else if (name === "append-block-children") { let { block_id, children, after } = args; // Remove dashes if present in block_id block_id = block_id.replace(/-/g, ""); const params = { block_id, children, }; if (after) { params.after = after.replace(/-/g, ""); // Ensure after ID is properly formatted } const response = await notion.blocks.children.append(params); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
- server.js:218-239 (registration)Tool registration in the tools/list response, including name, description, and input schema for 'append-block-children'.{ name: "append-block-children", description: "Append blocks to a parent block", inputSchema: { type: "object", properties: { block_id: { type: "string", description: "ID of the parent block (page or block)" }, children: { type: "array", description: "List of block objects to append" }, after: { type: "string", description: "Optional ID of an existing block to append after" } }, required: ["block_id", "children"] } },