append-block-children
Add content blocks to existing Notion pages or blocks. Specify a parent block ID and provide the new block objects to insert.
Instructions
Append blocks to a parent block
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block_id | Yes | ID of the parent block (page or block) | |
| children | Yes | List of block objects to append | |
| after | No | Optional ID of an existing block to append after |
Implementation Reference
- server.js:540-565 (handler)The handler function for the 'append-block-children' tool. It processes the input arguments, removes dashes from IDs, constructs parameters, calls the Notion API's notion.blocks.children.append method, and returns the response as JSON text.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:220-241 (schema)The schema definition for the 'append-block-children' tool, specifying input parameters: block_id (required), children (required array), and optional after.{ 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"] } },