GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MCP/schema: validation hardening + anchor-form $ref retention (PR #48638 series) · Issue #49978 · anomalyco/opencode

MCP/schema: validation hardening + anchor-form $ref retention (PR #48638 series) #49978

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
MCP/schema: validation hardening + anchor-form $ref retention (PR #48638 series)#49978
Copy link
Labels
triaging

Description

@AceRothstein71
AceRothstein71
opened on Sep 19, 2026
Issue body actions

Context

Part of the fork hardening series proposed in #48638 (branch session-diff-events). Tracker: #49565.

Problem

MCP tool-schema handling: prototype-pollution-prone maps, missing dialect/URN/anchor validation, duplicate anchors, hostile-shape compilation, dangling $ref pruning that also dropped resolvable anchor-form refs, and a hotfix for invalid recursive-schema placeholders (required:{} / empty combinators) that could brick tool schemas.

Change set (commit list, incl. catalog halves of mixed commits)

  • 6db8ab6 mcp schema hotfix
  • 02750b7 wave E schema
  • b1f1a08 wave C schema
  • 0edfce0 wave J-C catalog anchor+regex
  • 2b95854 wave M-C catalog ref
  • (catalog halves of 1ee7d23 / 88777b8 to be split for clean stacks)

Validation

  • Null-prototype maps, dialect/URN/anchor validation, duplicate-anchor removal; anchor-form $ref retained iff resolvable in same resource, dangling pruned; all corpora compile under ajv; catalog suite 32/0; mock capture: 0 required:{}, 0 empty combinators.

Linked: PR #48638 · tracker #49565 · sibling tracking issues listed in a follow-up comment.

Activity

  1. AceRothstein71 commented on Sep 19, 2026

    @AceRothstein71
    AceRothstein71
    on Sep 19, 2026
    Author
    More actions

    Cross-links: sibling tracking issues #49974 (perf/runtime), #49975 (shell classifier H-L), #49976 (shell classifier M-P), #49977 (instance lifecycle), #49978 (MCP/schema), #49979 (server/SSE + event/db), #49980 (updater tooling). Integration PR: #48638. Original tracker: #49565.

  2. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for writing this up. As it stands, this reads as a plan for a fork's stacked PRs rather than a bug report we can reproduce. In your own words, could you briefly tell us:

    • Which OpenCode version you see this on (opencode --version). Does it happen on current v2, not only on your fork?
    • Which MCP server or tool schema triggers it. A minimal schema that shows the problem would help most (e.g. a resolvable anchor-form $ref that gets dropped, or a recursive schema that ends up with required: {}).
    • What you expected to happen and what happened instead, with the exact error from the provider or OpenCode, and the provider/model if it matters.

    You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done editing.

    These existing issues look related, ordered from most to least likely. Please check whether one of them already covers your problem:

    • Console Go -> Meta: sanitize recursive $ref tool schemas (Codex Desktop codex_app tools hit it too) #48151: recursive $ref tool schemas need sanitizing before they reach the provider
    • Bug Report — houseCARL + Muse Spark 1.2 Contributor (Console Go) — Recursive JSON Schema #45823: tool calls fail with a recursive JSON Schema (Console Go)
    • Anthropic MCP tools fail when input schema uses root-level anyOf/oneOf/allOf #47543: MCP tools fail on Anthropic when the input schema uses root-level anyOf/oneOf/allOf
    • fix(core): keep MCP servers whose tool output schema has no type #57832: MCP servers dropped when a tool's output schema has no type
  3. opencodejr
    added
    triaging
    on Oct 28, 2026
  4. opencodejr
    closed this as not plannedon Oct 31, 2026
  5. opencodejr commented on Oct 31, 2026

    @opencodejr
    opencodejrBot
    on Oct 31, 2026
    Contributor
    More actions

    We haven't heard back with the details we asked for: the OpenCode version, a specific MCP server or tool schema that triggers the problem, and the expected versus actual behaviour. Without them we can't reproduce this on v2, so I'm closing it for now.

    If you can share a minimal failing schema and the exact error you see on a current v2 release, please open a new issue using the Bug Report template. You can also check whether #48151, #45823, #47543 or #57832 already covers it. Thanks for looking into MCP schema handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triaging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.