Skip to content

400 Bad Request: Schema Validation Failure for Nullable Array Types in MCP Tools #21094

Description

What happened?

Model: gemini-2.5-pro
Environment: VS Code Gemini Code Assist
Request ID: 7f24e1dc-87bb-484d-9c28-88434ff6c4ca
Description:
When using MCP servers (specifically Statsig) that define tool parameters as nullable arrays (e.g., type: ["array", "null"]), the orchestrator fails during the tool validation phase.

Error Log:
[warning] Tool [...] failed validation: converted nullable type array to OpenAPI nullable keyword for Gemini compatibility
[error] Server error: 400 Bad Request

Observed Behavior:
The engine attempts to convert the JSON schema to an OpenAPI-compatible format but generates an invalid payload or internal schema state that is subsequently rejected with a 400 error. This blocks the use of any MCP server that uses standard JSON schema "nullable" patterns.

What did you expect to happen?

To be able to interact with Statsig MCP server using Gemini (it works with models from other vendors like GPT or Claude)

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about

│ About Gemini CLI                                                                                                                                                                                            │
│                                                                                                                                                                                                             │
│ CLI Version                                                            0.32.1                                                                                                                               │
│ Git Commit                                                             e8a57c78c                                                                                                                            │
│ Model                                                                  Auto (Gemini 3)                                                                                                                      │
│ Sandbox                                                                no sandbox                                                                                                                           │
│ OS                                                                     darwin                                                                                                                               │
│ Auth Method                                                            Logged in with Google (xxx.xxx@decathlon.com)                                                                                │
│ Tier                                                                   Gemini Code Assist for individuals                

Login information

Google Account

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Labels

Stalearea/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualityarea/extensionsIssues related to Gemini CLI extensions capabilityeffort/small1 day or less: trivial logic, UI adjustments, docskind/bugpriority/p2Important but can be addressed in a future release.status/bot-triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions