Skip to content

"Failed to get tools" when MCP server returns outputSchema in tools/list response #21373

Closed

Description

@amat27

Description

Description
opencode v1.3.17 fails to load tools from MCP servers whose tools/list response includes the outputSchema field on tool definitions. The server is marked as failed with "Failed to get tools".
outputSchema is a valid optional field in the MCP specification and is defined in the bundled SDK's ToolSchema.

Steps to Reproduce

  1. Set up any MCP server (stdio transport) that returns outputSchema on its tools in the tools/list response
  2. Configure it in opencode as a local MCP server
  3. Start opencode — the server fails with "Failed to get tools"

Observed Behavior

  • The MCP server starts, initialize handshake completes successfully
  • tools/list returns a valid response with all tools
  • opencode immediately closes the connection after receiving the response
  • Server is marked as failed

Expected Behavior
Tools should load successfully. Removing outputSchema from the response (via a wrapper script) resolves the issue — all tools load and work correctly.

Environment

  • opencode: v1.3.17
  • OS: Windows 11
  • MCP transport: stdio (local)
  • Server protocol version: 2025-06-18
  • Bundled @modelcontextprotocol/sdk: v1.27.1

Plugins

No response

OpenCode version

1.3.17

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows 11

Terminal

windows terminal

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 7, 2026
  2. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  3. rekram1-node commented on Jun 22, 2026

    @rekram1-node
    Collaborator

    This was a legitimate failure in v1.3.17, though the trigger was more specifically an outputSchema with unresolved or otherwise problematic schema references rather than every outputSchema. It was tracked more precisely in #26529 and fixed by #26614, which shipped in v1.14.46. Closing as fixed/duplicate.

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

Metadata

Metadata

Assignees

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