MCP tools with nested object parameters are broken (serialized as string instead of JSON)

Resolved 💬 4 comments Opened Feb 15, 2026 by gmq68vm5kh-sketch Closed Feb 15, 2026

Description

MCP tools that accept object-type parameters (nested JSON) fail in Claude Code. The framework serializes these parameters as strings instead of passing them as proper JSON objects, causing nested fields to become undefined on the MCP server side.

Reproduction

Using the official Notion MCP server (@anthropic/claude-ai_Notion), any tool that takes a nested object parameter fails.

Example with notion-create-comment:

The tool expects:

{
  "parent": {"page_id": "xxx", "type": "page_id"},
  "rich_text": [{"text": {"content": "Hello"}}]
}

Claude Code sends parent as a serialized string instead of a JSON object. The MCP server then cannot find page_id inside the parameter and returns:

Invalid arguments for tool notion-create-comment: [
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": ["page_id"],
    "message": "Required"
  }
]

Affected tools (Notion MCP)

All tools with nested object parameters:

  • notion-create-pages (parameter parent)
  • notion-update-page (parameter data)
  • notion-move-pages (parameter new_parent)
  • notion-create-comment (parameter parent)

Working tools (Notion MCP)

Tools with flat/simple parameters work correctly:

  • notion-search
  • notion-fetch
  • notion-get-users
  • notion-get-comments
  • notion-get-teams

Expected behavior

Object-type parameters should be passed as proper JSON objects to the MCP server, not serialized as strings.

Environment

  • Claude Code (Cowork)
  • macOS
  • Date observed: 2026-02-14
  • The same MCP server and tools work correctly in other MCP clients, confirming the bug is in the Claude Code framework layer.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗