Skip to content

Parameter serialization bug: Object parameters received as strings in create-pages and move-pages tools #82

@Zafspanda

Description

@Zafspanda

Parameter serialization bug: Object parameters received as strings in create-pages and move-pages tools

Bug Description

Complex object parameters are being incorrectly serialized as strings in multiple Notion MCP tools, causing "Expected object, received string" validation errors.

Affected Tools

  • create-pages (when using parent parameter)
  • move-pages (when using new_parent parameter)

Error Message

MCP error -32602: Invalid arguments for tool create-pages: [
  {
    "code": "invalid_union", 
    "unionErrors": [{
      "issues": [{
        "code": "invalid_type",
        "expected": "object", 
        "received": "string",
        "path": ["parent"],
        "message": "Expected object, received string"
      }]
    }]
  }
]

Reproduction

create-pages example:

{
  "pages": [{"content": "test", "properties": {"title": "Test"}}],
  "parent": {"database_id": "example-database-id"}
}

move-pages example:

{
  "page_or_database_ids": ["example-page-id"],
  "new_parent": {"database_id": "example-database-id"}
}

Both fail with the same "Expected object, received string" error.

What Works

  • create-pages without parent parameter ✅
  • create-database with parent parameter ✅ (interestingly)
  • All simple parameter operations ✅

Impact

Cannot programmatically populate databases or organize pages, requiring manual entry for all database operations.

Environment

  • Claude Sonnet 4 via Claude.ai
  • Date: July 15, 2025

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