Skip to main content
Glama

notion-mcp-server

appendBlockChildren.ts852 B
import { notion } from "../services/notion.js"; import { AppendBlockChildrenParams } from "../types/blocks.js"; import { handleNotionError } from "../utils/error.js"; import { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; export const appendBlockChildren = async ( params: AppendBlockChildrenParams ): Promise<CallToolResult> => { try { const response = await notion.blocks.children.append({ block_id: params.blockId, children: params.children, }); return { content: [ { type: "text", text: `Successfully appended ${params.children.length} block(s) to ${params.blockId}`, }, { type: "text", text: `Block ID: ${JSON.stringify(response, null, 2)}`, }, ], }; } catch (error) { return handleNotionError(error); } };

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

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