notion_append_block_children
Add content blocks to existing Notion pages using structured data. Append paragraphs, lists, headings, and other block types to organize information within your workspace.
Instructions
Append children blocks to a parent block. LIMITS: Max 100 blocks, 2 nesting levels, 2000 chars per rich_text/URL.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block_id | Yes | The ID of the parent block.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-). | |
| children | Yes | Array of block objects to append. Each block must follow the Notion block schema. | |
| after | No | Block ID to append after. New blocks will be inserted right after this block.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-). | |
| format | No | Specify the response format. 'json' returns the original data structure, 'markdown' returns a more readable format. Use 'markdown' when the user only needs to read the page and isn't planning to write or modify it. Use 'json' when the user needs to read the page with the intention of writing to or modifying it. | markdown |
Implementation Reference
- src/client/index.ts:67-85 (handler)The actual implementation of appendBlockChildren method in NotionClientWrapper class that makes a PATCH request to the Notion API's /blocks/{block_id}/children endpoint to append child blocks to a parent block.async appendBlockChildren( block_id: string, children: Partial<BlockResponse>[], after?: string ): Promise<BlockResponse> { const body: Record<string, any> = { children }; if (after) body.after = after; const response = await fetch( `${this.baseUrl}/blocks/${block_id}/children`, { method: "PATCH", headers: this.headers, body: JSON.stringify(body), } ); return response.json(); }
- src/types/schemas.ts:14-41 (schema)Tool schema definition for 'notion_append_block_children' with input parameters including block_id (required), children (required array of block objects), after (optional), and format parameter. Includes limits description (100 blocks, 2 nesting levels, 2000 chars).export const appendBlockChildrenTool: Tool = { name: "notion_append_block_children", description: "Append children blocks to a parent block. **LIMITS:** Max 100 blocks, 2 nesting levels, 2000 chars per rich_text/URL.", inputSchema: { type: "object", properties: { block_id: { type: "string", description: "The ID of the parent block." + commonIdDescription, }, children: { type: "array", description: "Array of block objects to append. Each block must follow the Notion block schema.", items: blockObjectSchema, }, after: { type: "string", description: "Block ID to append after. New blocks will be inserted right after this block." + commonIdDescription, }, format: formatParameter, }, required: ["block_id", "children"], }, };
- src/server/index.ts:317-342 (registration)Tool registration where appendBlockChildrenTool is included in the allTools array and returned via ListToolsRequestSchema handler, making it available to MCP clients.server.setRequestHandler(ListToolsRequestSchema, async () => { const allTools = [ schemas.appendBlockChildrenTool, schemas.retrieveBlockTool, schemas.retrieveBlockChildrenTool, schemas.deleteBlockTool, schemas.updateBlockTool, schemas.createPageTool, schemas.retrievePageTool, schemas.updatePagePropertiesTool, schemas.listAllUsersTool, schemas.retrieveUserTool, schemas.retrieveBotUserTool, schemas.createDatabaseTool, schemas.queryDatabaseTool, schemas.retrieveDatabaseTool, schemas.updateDatabaseTool, schemas.createDatabaseItemTool, schemas.createCommentTool, schemas.retrieveCommentsTool, schemas.searchTool, ]; return { tools: filterTools(allTools, enabledToolsSet), }; });
- src/server/index.ts:51-65 (handler)Request handler switch case that routes 'notion_append_block_children' tool requests, validates required arguments (block_id, children), and calls the NotionClientWrapper.appendBlockChildren method with the arguments.case "notion_append_block_children": { const args = request.params .arguments as unknown as args.AppendBlockChildrenArgs; if (!args.block_id || !args.children) { throw new Error( "Missing required arguments: block_id and children" ); } response = await notionClient.appendBlockChildren( args.block_id, args.children, args.after ); break; }
- src/types/args.ts:8-13 (schema)Type definition for AppendBlockChildrenArgs interface specifying block_id, children array, optional after parameter, and optional format parameter for JSON or markdown output.export interface AppendBlockChildrenArgs { block_id: string; children: Partial<BlockResponse>[]; after?: string; format?: "json" | "markdown"; }