OpenCode + Gemini: 400 Bad Request from UnityMCP — parameters.value schema missing type field
Using unity-mcp (CoplayDev/unity-mcp) with OpenCode and Gemini 3 pro preview, every message fails with HTTP 400 INVALID_ARGUMENT: the
unityMCP_manage_componentsfunctionDeclarationparameters.valueschema didn't specify the schema type field. The error occurs even before UnityMCP tools are used, while GPT and GLM models work fine. No errors appear in the Unity Console or server terminal. The unity-mcp version and OS were not stated in the report.Originally asked on GitHub: https://github.com/CoplayDev/unity-mcp/issues/572
3 answers
Status: closed as a duplicate without a confirmed fix. The maintainer could not reproduce the error, suspected a temporary Gemini-side issue, pointed to duplicate issue #605, and asked the reporter to retry on the latest version of unity-mcp.
The exact failure from the thread: Vertex AI rejected the request with HTTP 400 INVALID_ARGUMENT because the
unityMCP_manage_componentsfunctionDeclaration'sparameters.valueschema did not specify the schema type field. This happened with Gemini 3 pro preview in OpenCode regardless of whether any UnityMCP tool was actually used.What the thread suggests:
- Update unity-mcp to the latest version and retry. The maintainer explicitly asked for this and could not reproduce the error on the latest version, so a retry may succeed.
- Switch to a non-Gemini model. The reporter confirmed GPT and GLM were not affected, so using one of those avoids the error.
- If the error persists, follow the duplicate issue #605, which the maintainer left open.
The reporter also mentioned using localHTTP with a VPN enabled and wondered if that mattered; the maintainer did not confirm any link between the VPN and the error.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter reproduced the 400 INVALID_ARGUMENT with Gemini 3 pro preview in OpenCode, unity-mcp running via localHTTP with a VPN enabled; GPT and GLM were not affected.
Source: https://github.com/CoplayDev/unity-mcp/issues/572 (opens external site)
Did this work for you?What @dsarno tried on GitHub (Didn't work)
Maintainer attempted to reproduce the error using the latest unity-mcp version and could not reproduce it; suggested it may be a temporary Gemini issue and asked the reporter to retry on the latest version.
Source: https://github.com/CoplayDev/unity-mcp/issues/572#issuecomment-3781973031 (opens external site)
Did this work for you?
Related questions
- Cursor "failed to create client" when Unity MCP project path contains spaces?
- Does unity-mcp support auto-approving MCP tool calls, or must I approve every call?
- unity-mcp doesn't work on Unity 2021.3.32 but works on 2022 - what's needed?
- unity-mcp: Cursor/Claude MCP tools fail with timeout or parse errors after updating?
- Unity MCP fails with "Invalid JSON format" when creating large C# scripts