Huh, I solved my problem by disabling one of my mcp.
1. Issue Summary
Users of the Antigravity editor (or any Gemini-powered agent) experience a complete failure of the AI assistant when the @a-bonus/google-docs-mcp server is active. The assistant returns a 400 Bad Request error instead of responding to prompts.
2. Technical Root Cause
The error is caused by a JSON Schema validation failure within the Google Gemini API (GenerateContentRequest).
Gemini’s API enforces strict schema validation for tools (function calling). Specifically, any parameter defined as an array must have an items property. In the case of 2D arrays (common in Google Sheets for rows and columns), the schema must define items for the outer array and another items property for the inner array.
The @a-bonus/google-docs-mcp package uses z.any() for the innermost values of its spreadsheet tools. This causes the generated JSON schema to look like this:
"values": {
"type": "array",
"items": {
"type": "array"
// MISSING "items" property here!
}
}
Gemini rejects this with the error: items.items: missing field.
3. Affected Tools & Files
The following tools in the @a-bonus/google-docs-mcp package (located in the local npm cache) are responsible for the crash:
| Tool Name | Affected Parameter | File Path (Relative to package root) |
| :— | :— | :— |
| writeSpreadsheet | values | dist/tools/sheets/writeSpreadsheet.js |
| batchWrite | data[].values | dist/tools/sheets/batchWrite.js |
| appendSpreadsheetRows| values | dist/tools/sheets/appendSpreadsheetRows.js |
| createSpreadsheet | initialData | dist/tools/sheets/createSpreadsheet.js |
4. Proposed Solution
The z.any() definition must be replaced with a more explicit type that Gemini can validate, such as a union of primitives (string, number, boolean, or null).
Current Code:
values: z.array(z.array(z.any()))
Corrected Code (Gemini-Compatible):
values: z.array(z.array(z.union([z.string(), z.number(), z.boolean(), z.null()])))