mcp-google-sheets: 400 Invalid schema for function 'update_cells' (array schema missing items)
I run mcp-google-sheets from my Express.js backend on Windows via
uvx mcp-google-sheets@latestand call it through mcp-use-ts with ChatOpenAI (gpt-4o). I getBadRequestError: 400 Invalid schema for function 'update_cells': In context=('properties', 'data', 'items'), array schema missing items.Why does this happen and how do I fix it?Originally asked on GitHub: https://github.com/xing5/mcp-google-sheets/issues/16
4 answers
Status: explained — the maintainer closed the thread (2025-06-18) without a server-side fix, stating the issue is tied to the client-side prompt and the model in use, and that on the MCP server side all they can do is keep documentation clear and error responses accurate. The reporter's screenshot showed the server was authenticated via ADC, so auth was not the problem.
The error came from OpenAI rejecting the generated function schema:
tools[30].function.parametersforupdate_cellshad an array (properties.data.items) missing theitemsfield. No working fix was posted in the thread. The reporter called the server from an Express.js backend on Windows using mcp-use-ts withgsheet: { command: "uvx", args: ["mcp-google-sheets@latest"] },new ChatOpenAI({ modelName: "gpt-4o" }), andMCPAgent; Google Docs and PDF MCP servers worked with the same client, so the issue was specific to this server's schema. The reporter also said reading sheet data failed even with a standard client format, with no further details supplied.If you hit this, the practical path is to change how your client converts this server's MCP tool schemas into OpenAI function parameters — for example, ensure array schemas declare
itemsbefore the call reaches the API. That is general advice, since the thread contains no tested fix. General advice: keepservice-account.jsonout of version control and don't log its contents.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Set SERVICE_ACCOUNT_PATH and DRIVE_FOLDER_ID in .env and via
set, then ran the server from the Express.js backend; received the 400 BadRequestError for update_cells.Source: https://github.com/xing5/mcp-google-sheets/issues/16 (opens external site)
Did this work for you?What @healer-125 tried on GitHub (Didn't work)
Used mcp-use-ts with
gsheet: { command: "uvx", args: ["mcp-google-sheets@latest"] }, ChatOpenAI gpt-4o, and MCPAgent; Google Docs and PDF MCP servers worked, but mcp-google-sheets still failed with the same schema error.Source: https://github.com/xing5/mcp-google-sheets/issues/16#issuecomment-2973223553 (opens external site)
Did this work for you?What @healer-125 tried on GitHub (Didn't work)
Tried using the server with a standard MCP client format to read Google Sheets data; reading still failed while other tools worked.
Source: https://github.com/xing5/mcp-google-sheets/issues/16#issuecomment-2982171963 (opens external site)
Did this work for you?
Related questions
- Can I use mcp-google-sheets with Gemini, or does it only work with Claude?
- mcp-google-sheets create_spreadsheet fails with 403 PERMISSION_DENIED when using a service account
- Cursor shows "0 tools enabled" for mcp-google-sheets even though the SSE server runs on port 8000
- mcp-google-sheets: 'file_cache is only supported with oauth2client<4.0.0' — is it stuck?
- mcp-google-sheets: 403 storage/quota error when creating a spreadsheet with a service account