[PR #712] [CLOSED] MCP tool schema transformation for OpenAI/Azure providers #9693

Closed
opened 2026-02-16 18:14:00 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/712
Author: @ribelo
Created: 7/5/2025
Status: Closed

Base: devHead: fix/mcp-schema-transformation


📝 Commits (2)

  • 81a110c fix: MCP tool schema transformation for OpenAI/Azure providers
  • 0e38f6b chore: format code

📊 Changes

3 files changed (+98 additions, -7 deletions)

View changed files

📝 packages/opencode/src/mcp/index.ts (+38 -6)
📝 packages/opencode/src/provider/provider.ts (+59 -0)
📝 packages/opencode/src/session/index.ts (+1 -1)

📄 Description

Fixes MCP tools failing with OpenAI/Azure providers due to schema compatibility
issues.

Resolves:

Changes:

  • Transform MCP tool schemas to make optional parameters nullable + required for
    OpenAI/Azure
  • Move transformation logic to MCP module for cleaner architecture
  • Graceful fallback for complex schemas

Tested with: context7-mcp, works with OpenAI models


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/712 **Author:** [@ribelo](https://github.com/ribelo) **Created:** 7/5/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/mcp-schema-transformation` --- ### 📝 Commits (2) - [`81a110c`](https://github.com/anomalyco/opencode/commit/81a110c6460cc3b95e51da3a349abe1897f9b236) fix: MCP tool schema transformation for OpenAI/Azure providers - [`0e38f6b`](https://github.com/anomalyco/opencode/commit/0e38f6be030f9f447ce8de7d8f8586ca9a7512a6) chore: format code ### 📊 Changes **3 files changed** (+98 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/mcp/index.ts` (+38 -6) 📝 `packages/opencode/src/provider/provider.ts` (+59 -0) 📝 `packages/opencode/src/session/index.ts` (+1 -1) </details> ### 📄 Description Fixes MCP tools failing with OpenAI/Azure providers due to schema compatibility issues. **Resolves:** - #250 - #441 **Changes:** - Transform MCP tool schemas to make optional parameters nullable + required for OpenAI/Azure - Move transformation logic to MCP module for cleaner architecture - Graceful fallback for complex schemas **Tested with:** context7-mcp, works with OpenAI models --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:00 -05:00
yindo closed this issue 2026-02-16 18:14:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9693