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 servers with outputSchema in tools/list break tool discovery · Issue #21591 · anomalyco/opencode

MCP servers with outputSchema in tools/list break tool discovery #21591

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
MCP servers with outputSchema in tools/list break tool discovery#21591
Copy link
Assignees
nexxeln

Description

@claygeo
claygeo
opened on Apr 9, 2026
Issue body actions

Bug Description

When an MCP server returns outputSchema in its tools/list response, opencode shows "Failed to get tools" and the server becomes unusable. The outputSchema field is valid per MCP spec (protocol version 2025-06-18).

Steps to Reproduce

  1. Configure an MCP server that returns tools with outputSchema in the tool definition
  2. Start opencode
  3. Observe "Failed to get tools" for that server

Expected Behavior

Tools should load successfully. opencode doesn't use outputSchema — it only reads inputSchema in convertMcpTool().

Actual Behavior

The entire listTools() call fails because cacheToolMetadata() calls AjvJsonSchemaValidator.getValidator(tool.outputSchema), and if AJV can't compile the schema (unsupported keywords, complex schemas), it throws an unhandled error.

Root Cause

AjvJsonSchemaValidator.getValidator() in the MCP SDK calls ajv.compile(schema) with no try/catch. The error propagates through listTools() → caught by opencode's defs() → returns undefined → "Failed to get tools".

Environment

  • opencode version: latest (dev branch)
  • MCP SDK: v1.27.1
  • OS: any
Reacted by TomDarmon

Activity

  1. github-actions
    assigned
    rekram1-node
    on Apr 9, 2026
  2. github-actions
    added
    acp
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 9, 2026
  3. github-actions commented on Apr 9, 2026

    @github-actions
    github-actionsBot
    on Apr 9, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • "Failed to get tools" when MCP server returns outputSchema in tools/list response #21373: Same root cause — MCP servers returning outputSchema in tools/list response causing "Failed to get tools" error, with identical MCP SDK version and protocol version mentioned.

    If this is indeed a duplicate, please consider closing this issue and adding any additional context to #21373 instead.

  4. thdxr
    removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    acp
    on May 3, 2026
  5. thdxr
    assigned
    nexxeln
    and unassigned
    rekram1-node
    on May 3, 2026
  6. github-actions commented on Jul 3, 2026

    @github-actions
    github-actionsBot
    on Jul 3, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  7. github-actions
    closed this as not plannedon Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @nexxeln
    nexxeln

Labels

No labels
No labels

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.