MCP boolean parameters are serialized as strings, causing validation errors

Resolved 💬 3 comments Opened Feb 26, 2026 by je-pu-pu Closed Mar 3, 2026

Description

When calling MCP tools that expect boolean parameters, Claude Code serializes true/false as strings ("true"/"false") instead of JSON booleans. This causes Zod validation errors on the MCP server side.

Steps to Reproduce

  1. Connect to Asana's official MCP server (mcp.asana.com/sse) via Claude Code
  2. Call asana_update_task with completed: true
  3. Observe the error:
MCP error -32602: Input validation error: Invalid arguments for tool asana_update_task: [
  {
    "code": "invalid_type",
    "expected": "boolean",
    "received": "string",
    "path": ["completed"],
    "message": "Expected boolean, received string"
  }
]

Expected Behavior

Boolean parameters should be passed as JSON booleans (true/false), not as strings ("true"/"false").

Actual Behavior

All parameter values are serialized as strings in the XML-like parameter format, so true becomes "true".

Environment

  • Claude Code version: 2.1.59 (latest)
  • OS: Windows 11
  • MCP Server: Asana official (mcp.asana.com/sse)

Notes

  • This issue affects any MCP tool that defines boolean parameters, not just Asana.
  • Other MCP clients (Roo Code, GitHub Copilot) handle the same Asana MCP server correctly.
  • Possibly related to #5504 and #3084 (JSON object serialization issues).

View original on GitHub ↗

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