[PR #4538] fix: transform MCP tool schemas for Google/Gemini compatibility #11009

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

Original Pull Request: https://github.com/anomalyco/opencode/pull/4538

State: closed
Merged: Yes


  • Apply ProviderTransform.schema() to MCP tools to convert integer enums to strings
  • Convert function declaration to arrow function for strict mode compliance
  • Fix variable shadowing in content iteration loop

Resolves 'Invalid value at tools.function_declarations' error when using
Google/Gemini with MCP tools that have integer enum parameters.

Closes: #4512

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4538 **State:** closed **Merged:** Yes --- - Apply ProviderTransform.schema() to MCP tools to convert integer enums to strings - Convert function declaration to arrow function for strict mode compliance - Fix variable shadowing in content iteration loop Resolves 'Invalid value at tools.function_declarations' error when using Google/Gemini with MCP tools that have integer enum parameters. Closes: #4512
yindo added the pull-request label 2026-02-16 18:15:47 -05:00
yindo closed this issue 2026-02-16 18:15:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11009