Skip to main content
Glama

notion_append_block_children

Append new content blocks to a parent block in Notion, with optional placement after a specific block. Supports various block types for structured content creation.

Instructions

Append new children blocks to a specified parent block in Notion. Requires insert content capabilities. You can optionally specify the 'after' parameter to append after a certain block.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoThe ID of the existing block that the new block should be appended after.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
block_idYesThe ID of the parent block.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
childrenYesArray of block objects to append. Each block must follow the Notion block schema.
formatNoSpecify 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

  • Core implementation of the notion_append_block_children tool in NotionClientWrapper, performing PATCH request to Notion API /blocks/{block_id}/children endpoint to append child blocks.
    async appendBlockChildren( block_id: string, children: Partial<BlockResponse>[] ): Promise<BlockResponse> { const body = { children }; const response = await fetch( `${this.baseUrl}/blocks/${block_id}/children`, { method: "PATCH", headers: this.headers, body: JSON.stringify(body), } ); return response.json(); }
  • MCP server CallToolRequest handler dispatches 'notion_append_block_children' calls, validates arguments, and invokes NotionClientWrapper.appendBlockChildren.
    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 ); break; }
  • Input schema and metadata definition for the notion_append_block_children tool.
    export const appendBlockChildrenTool: Tool = { name: "notion_append_block_children", description: "Append new children blocks to a specified parent block in Notion. Requires insert content capabilities. You can optionally specify the 'after' parameter to append after a certain block.", 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: "The ID of the existing block that the new block should be appended after." + commonIdDescription, }, format: formatParameter, }, required: ["block_id", "children"], }, };
  • Tool registration in MCP server's ListToolsRequestHandler, including appendBlockChildrenTool in the list of available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => { const allTools = [ schemas.appendBlockChildrenTool, schemas.retrieveBlockTool, schemas.retrieveBlockChildrenTool, schemas.deleteBlockTool, schemas.updateBlockTool, 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), }; });

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/kimjungyeol/mcp-notion-server'

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