Skip to content

API-update-a-block: type parameter wraps block content incorrectly, breaking all block updates #14

@Haikane

Description

@Haikane

Bug

The API-update-a-block tool cannot update any block's text content or checked state. Every attempt returns a 400 validation error.

Root cause

The tool schema defines a type parameter (object) for passing block content updates. When called, the MCP server serializes this as:

{
  "block_id": "...",
  "type": {
    "paragraph": {
      "rich_text": [{"type": "text", "text": {"content": "new text"}}]
    }
  }
}

But the Notion API expects the block type as a top-level body field:

{
  "paragraph": {
    "rich_text": [{"type": "text", "text": {"content": "new text"}}]
  }
}

The error message confirms this:

body.paragraph should be defined, instead was `undefined`.
body.type should be not present, instead was `{"paragraph":{"rich_text":[...]}}`

Affected block types

All of them. Tested with paragraph, to_do, heading_3, and bulleted_list_item. The type parameter always gets wrapped as body.type instead of being spread into the body.

Workaround

The only current workaround is to delete the block and recreate it with new content, which loses block position, nesting, and children.

Expected fix

The tool should either:

  1. Spread the contents of the type parameter into the top-level request body, or
  2. Replace the type parameter with individual top-level parameters for each supported block type (paragraph, to_do, heading_3, etc.)

Note: archived works correctly since it's already a top-level parameter in the schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions