Skip to main content
Glama

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
NameRequiredDescriptionDefault
afterNoOptional ID of an existing block to append after
block_idYesID of the parent block (page or block)
childrenYesList of block objects to append

Implementation Reference

  • 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"] } },

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emmanuelsystems/mcpnotionslack'

If you have feedback or need assistance with the MCP directory API, please join our Discord server