MCP invalid schema in gpt-5.2-codex
Description
Hello,
I'm using latest opencode and gitlab cli (1.80.4) and it works in most models but I encounter an error in gpt-5.2-codex.
Invalid schema for function 'glab_glab_api': In context=('properties', 'flags', 'properties', 'field'), array schema missing items.
config:
"glab": {
"type": "local",
"enabled": true,
"command": ["glab", "mcp", "serve"]
},
Plugins
No response
OpenCode version
1.1.19
Steps to reproduce
- install and configure gitlab glab cli for MCP
- add config
"glab": {
"type": "local",
"enabled": true,
"command": ["glab", "mcp", "serve"]
},
- run a prompt
Screenshot and/or share link
Operating System
MacOS 26
Terminal
Ghostty
This issue might be a duplicate of existing issues. Please check:
- #650: bug: MCP - Invalid JSON Schema when using Docker MCP Gateway
- #8102: 🐛 Bug Report: MCP Tool JSON Parsing Errors on OpenCode (GLM-4.7)
- #3523: [BUG] tools[21].function.name': string too long. Expected a string with maximum length 64
These issues deal with MCP schema validation and error messages related to invalid JSON schemas and tool function naming. The error in your issue about 'Invalid schema for function' appears to be part of a broader MCP schema validation problem affecting multiple MCP servers.
Feel free to ignore if none of these address your specific case.