Notion MCP: notion-create-pages validation fails with misleading error when title contains special chars + body has substantial content

Open 💬 1 comment Opened May 7, 2026 by dadaburner-spec

Summary

The notion-create-pages tool (Notion MCP connector) fails validation with a misleading error when:

  • The title contains certain special characters (notably <>, possibly others), AND
  • The content field has substantial body content (more than a few hundred chars)

The error message is misleading — it claims the issue is on the pages parameter as a string with a 100-character limit, but the actual pages parameter is an array, and no documented field has a 100-char limit that's relevant here.

Reproduction

Failing call:

{
  "parent": {"type": "data_source_id", "data_source_id": "<uuid>"},
  "pages": [{
    "properties": {
      "Title": "Code <> Chrome xfer and Backup",
      ...other properties...
    },
    "content": "...several KB of valid markdown content..."
  }]
}

Error returned:

MCP error -32602: Input validation error: Invalid arguments for tool notion-create-pages: [
  { "expected": "array", "code": "invalid_type", "path": ["pages"],
    "message": "Invalid input: expected array, received string" },
  { "origin": "string", "code": "too_big", "maximum": 100, "inclusive": true,
    "path": ["pages"],
    "message": "Too big: expected string to have <=100 characters" }
]

The pages parameter is correctly formatted as an array of objects in the request, not a string. Both validation errors point at pages simultaneously, contradicting each other ("expected array, received string" + "expected string ≤ 100 chars on pages").

Working call (same request, just removed <> from title):

{
  "parent": {"type": "data_source_id", "data_source_id": "<same uuid>"},
  "pages": [{
    "properties": {
      "Title": "Code Chrome xfer and Backup",
      ...identical other properties...
    },
    "content": "...identical body content..."
  }]
}

Returns 200 with a created page.

Working call (same <> in title, but title-only no body):

{
  "parent": {...},
  "pages": [{"properties": {"Title": "Code <> Chrome xfer and Backup"}}]
}

Returns 200.

Pattern

The combination of special characters in the title AND substantial body content triggers the validation error. Either alone is fine. The internal validation appears to JSON-stringify or HTML-escape the entire pages array when checking some path, and <> interacts badly with that path.

Notably, notion-update-page with update_properties accepts <> in the title fine — only notion-create-pages exhibits this.

Impact

  • Misleading error messages waste developer time. The "100-character limit" suggestion is a dead-end debugging trail since no documented field has that limit at the right scope.
  • Requires a workaround pattern: create with empty/safe body, then update-page with replace_content to set the actual body. Two API calls instead of one.

Suggested fix

Either:

  1. Fix the input escaping/serialization on the create endpoint so it handles special chars correctly
  2. At minimum, return a clearer error message that points at the actual problem (e.g., "title contains characters that conflict with internal escaping when combined with body content; please use update-page after create").

Environment

  • Claude Code v2.1.128 on macOS Sequoia (Darwin 25.3.0)
  • Notion MCP connector via https://mcp.notion.com/mcp (or similar — accessed through Anthropic's MCP connector infrastructure)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗