Skip to main content
Glama
SunCreation

MCP Notion Server (@suncreation)

by SunCreation

notion_update_block

Modify content in Notion blocks by replacing field values according to block type specifications. Supports JSON or Markdown response formats for different use cases.

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

  • The actual implementation of the updateBlock method that makes a PATCH request to Notion's API to update a block
    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();
    }
  • The switch case handler that routes 'notion_update_block' tool requests to the client's updateBlock method
    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;
    }
  • The MCP Tool schema definition for 'notion_update_block' that defines input validation
    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"],
      },
    };
  • TypeScript interface definition for UpdateBlockArgs type
    export interface UpdateBlockArgs {
      block_id: string;
      block: Partial<BlockResponse>;
      format?: "json" | "markdown";
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it 'replaces the entire value for a given field,' which implies mutation. It doesn't disclose behavioral traits like required permissions, whether changes are reversible, rate limits, or what happens to unspecified fields. For a mutation tool with zero annotation coverage, this is a significant gap.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core purpose. However, it could be slightly more structured by separating behavioral details, but it avoids unnecessary repetition and wastes no words.

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?

Given a mutation tool with no annotations and no output schema, the description is minimally adequate but incomplete. It covers the basic action and parameter intent but lacks details on behavioral context, error handling, or return values, leaving gaps for an AI agent to infer safely.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond implying block content must match type, which is partially covered in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('update the content of a block') and resource ('a block in Notion'), specifying it's based on block type and replaces entire field values. It distinguishes from siblings like notion_append_block_children (adds children) and notion_delete_block (removes), but doesn't explicitly name alternatives.

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?

Usage is implied through the description of replacing entire field values based on block type, suggesting it's for modifying existing blocks rather than creating new ones. However, it lacks explicit guidance on when to use this vs. alternatives like notion_update_page_properties or notion_retrieve_block, and doesn't mention prerequisites or exclusions.

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

Install Server

Other Tools

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

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