Skip to main content
Glama

update-block

Modify content or archive status of Notion blocks to keep information current and organized.

Instructions

Update a block's content or archive status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
block_idYesID of the block to update
block_typeYesThe type of block (paragraph, heading_1, to_do, etc.)
contentYesThe content for the block based on its type
archivedNoWhether to archive (true) or restore (false) the block

Implementation Reference

  • The handler logic for the 'update-block' tool. It constructs update parameters using the dynamic block_type key for content, optionally sets archived status, calls notion.blocks.update, and returns the JSON response.
    else if (name === "update-block") { let { block_id, block_type, content, archived } = args; // Remove dashes if present in block_id block_id = block_id.replace(/-/g, ""); const updateParams = { block_id, [block_type]: content, }; if (archived !== undefined) { updateParams.archived = archived; } const response = await notion.blocks.update(updateParams); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
  • Input schema definition for the 'update-block' tool in the tools/list response.
    { name: "update-block", description: "Update a block's content or archive status", inputSchema: { type: "object", properties: { block_id: { type: "string", description: "ID of the block to update" }, block_type: { type: "string", description: "The type of block (paragraph, heading_1, to_do, etc.)" }, content: { type: "object", description: "The content for the block based on its type" }, archived: { type: "boolean", description: "Whether to archive (true) or restore (false) the block" } }, required: ["block_id", "block_type", "content"] } },
  • server.js:242-267 (registration)
    The tool 'update-block' is registered/listed in the tools/list handler response.
    { name: "update-block", description: "Update a block's content or archive status", inputSchema: { type: "object", properties: { block_id: { type: "string", description: "ID of the block to update" }, block_type: { type: "string", description: "The type of block (paragraph, heading_1, to_do, etc.)" }, content: { type: "object", description: "The content for the block based on its type" }, archived: { type: "boolean", description: "Whether to archive (true) or restore (false) the block" } }, required: ["block_id", "block_type", "content"] } },

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/Sjotie/notionMCP'

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