MCP tools with nested object parameters are broken (serialized as string instead of JSON)
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(parameterparent)notion-update-page(parameterdata)notion-move-pages(parameternew_parent)notion-create-comment(parameterparent)
Working tools (Notion MCP)
Tools with flat/simple parameters work correctly:
notion-searchnotion-fetchnotion-get-usersnotion-get-commentsnotion-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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗