Skip to content

fix(mcp): preserve metadata across tool pages#35439

Merged
rekram1-node merged 7 commits into
devfrom
mcp-schema-pagination
Jul 6, 2026
Merged

fix(mcp): preserve metadata across tool pages#35439
rekram1-node merged 7 commits into
devfrom
mcp-schema-pagination

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve MCP output-schema and task metadata while OpenCode traverses paginated tools/list responses
  • reset the SDK metadata cache on the first page and append metadata from continuation pages
  • keep the SDK listTools() request and return semantics unchanged
  • cover the regression with a real in-memory MCP client/server test

Upstream

This mirrors the MCP TypeScript SDK fix: modelcontextprotocol/typescript-sdk@2c2a127 (fix: preserve tool schema metadata across pagination). The local patch is needed while OpenCode remains on SDK 1.29.0.

Testing

  • bun test test/mcp/catalog.test.ts
  • bun test test/mcp --only-failures (60 pass, 0 fail)
  • clean forced install of the patched SDK
  • Node syntax checks for patched CJS and ESM client builds

@rekram1-node rekram1-node force-pushed the mcp-schema-pagination branch from 324805e to 7589a7c Compare July 5, 2026 18:07
@rekram1-node rekram1-node merged commit 2b34df9 into dev Jul 6, 2026
10 checks passed
@rekram1-node rekram1-node deleted the mcp-schema-pagination branch July 6, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant