[BUG] Claude displays optional nullable MCP parameters as `unknown`

Resolved 💬 2 comments Opened Aug 15, 2025 by sebthom Closed Dec 4, 2025

Environment

  • Platform (select one):
  • [X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.81
  • Operating System: Windows 10
  • Terminal: cmd

Bug Description

When displaying the description of an MCP Tool, claude-code shows the type of optional parameters as unknown instead of the actual type. E.g.

// max_results schema:
{
    "anyOf": [
        { "type": "integer" },
        { "type": "null" }
    ],
    "default": null,
    "description": "Maximum results to return",
    "title": "Max Results"
}

<img width="976" height="720" alt="Image" src="https://github.com/user-attachments/assets/c648cc26-d0a1-4327-9eda-43ee01fa19f3" />

Steps to Reproduce

  1. Add the https://github.com/ast-grep/ast-grep-mcp MCP server
  2. Launch claude-code
  3. Inspect the ast-grep mcp server tools (find_code or find_code_by_rule) via the /mcp command

Expected Behavior

The parameter type is rendered as integer | null or integer? or since required parameters are already marked with (required) it might also be enough to simply render the type as integer.

Actual Behavior

claude-code displays the parameter type as unknown

Additional Context

<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

View original on GitHub ↗

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