[Bug] MCP Server - Invalid JSON schema reference #/$defs/ScreenInstance

Bug Report: Stitch MCP Server Schema Error

Environment

Description

When connecting to the Stitch MCP server, the connection establishes successfully but fails when retrieving tools due to an invalid JSON schema reference.

Error Message

ERROR can’t resolve reference #/$defs/ScreenInstance from id # failed to get tools from client

Steps to Reproduce

  1. Configure Stitch MCP in OpenCode with API key authentication
  2. Run opencode mcp list
  3. Observe: connection succeeds but tools retrieval fails

Verification

  • Direct curl to endpoint works: curl -X POST https://stitch.googleapis.com/mcp -H "X-Goog-Api-Key: ..." -d "{\"jsonrpc\":\"2.0\",\"method\":\"tools/list\",\"id\":1}" returns valid JSON
  • The server returns tools but the schema contains invalid references

Expected Behavior

MCP tools should be successfully retrieved and usable in OpenCode.