Skip to main content
Glama

notion_update_block

Modify content in Notion blocks by replacing entire field values based on block type. Use to update text, lists, or other elements within your Notion workspace.

Instructions

Update the content of a block in Notion based on its type. The update replaces the entire value for a given field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
block_idYesThe ID of the block to update.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
blockYesThe updated content for the block. Must match the block's type 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

  • MCP tool handler for 'notion_update_block': validates input arguments (block_id and block), then delegates to notionClient.updateBlock.
    case "notion_update_block": {
      const args = request.params
        .arguments as unknown as args.UpdateBlockArgs;
      if (!args.block_id || !args.block) {
        throw new Error("Missing required arguments: block_id and block");
      }
      response = await notionClient.updateBlock(
        args.block_id,
        args.block
      );
      break;
  • Tool schema defining name, description, input schema (block_id, block, optional format) for 'notion_update_block'.
    export const updateBlockTool: Tool = {
      name: "notion_update_block",
      description:
        "Update the content of a block in Notion based on its type. The update replaces the entire value for a given field.",
      inputSchema: {
        type: "object",
        properties: {
          block_id: {
            type: "string",
            description: "The ID of the block to update." + commonIdDescription,
          },
          block: {
            type: "object",
            description:
              "The updated content for the block. Must match the block's type schema.",
          },
          format: formatParameter,
        },
        required: ["block_id", "block"],
      },
    };
  • Core implementation in NotionClientWrapper: sends PATCH request to Notion API endpoint /blocks/{block_id} with the block update payload.
    async updateBlock(
      block_id: string,
      block: Partial<BlockResponse>
    ): Promise<BlockResponse> {
      const response = await fetch(`${this.baseUrl}/blocks/${block_id}`, {
        method: "PATCH",
        headers: this.headers,
        body: JSON.stringify(block),
      });
    
      return response.json();
    }
  • Tool registration: includes updateBlockTool (schemas.updateBlockTool) in the list of available tools returned by ListToolsRequest.
    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),
      };
    });

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Notes the replacement behavior ('replaces the entire value'), but with no annotations, it omits details on permissions, error conditions, or idempotency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, no fluff, front-loaded with key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers basic purpose and replacement behavior but lacks details on response format, error handling, and required structure of the block object. No output schema exacerbates gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. The description adds context about 'based on its type' and 'replaces entire value', which meaningfully supplements the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates block content, specifies it's type-dependent, and distinguishes from sibling tools like notion_retrieve_block and notion_delete_block.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when updating a block but provides no explicit guidance on when to use alternatives like notion_append_block_children or notion_update_page_properties.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.