opencode icon indicating copy to clipboard operation
opencode copied to clipboard

MCP invalid schema in gpt-5.2-codex

Open MartinVerges opened this issue 2 weeks ago • 1 comments

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

  1. install and configure gitlab glab cli for MCP
  2. add config
    "glab": {
      "type": "local",
      "enabled": true,
      "command": ["glab", "mcp", "serve"]
    },
  1. run a prompt

Screenshot and/or share link

Image

Operating System

MacOS 26

Terminal

Ghostty

MartinVerges avatar Jan 14 '26 10:01 MartinVerges

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.

github-actions[bot] avatar Jan 14 '26 10:01 github-actions[bot]