Skip to content

Fix OpenAI tool schema rejection by bumping mcp-go to v0.45.0#102

Merged
wesleyjellis merged 1 commit intomainfrom
fix/bump-mcp-go-schema-properties
Mar 31, 2026
Merged

Fix OpenAI tool schema rejection by bumping mcp-go to v0.45.0#102
wesleyjellis merged 1 commit intomainfrom
fix/bump-mcp-go-schema-properties

Conversation

@saditya370
Copy link
Copy Markdown
Contributor

@saditya370 saditya370 commented Mar 25, 2026

Summary

  • Bumps github.com/mark3labs/mcp-go from v0.41.1 to v0.45.0 to fix tool schema serialization
  • Parameter-less tools (e.g. users, actions, filters, domains, systems) were serialized as {"type": "object"} — missing the "properties" field that OpenAI's function calling API requires
  • Root cause was in the mcp-go library: ToolInputSchema lacked a custom MarshalJSON and used omitempty struct tags, causing Go to silently drop empty "properties" and "required" fields
  • Upstream fixes: mcp-go PR #713 added MarshalJSON on ToolInputSchema, mcp-go PR #727 removed omitempty from struct tags

Before:
{"type": "object"}

After:
{"type": "object", "properties": {}, "required": []}

Test plan

  • Compiles cleanly with zero breaking API changes
  • Verified parameter-less tools now emit "properties": {} and "required": []
  • Run mcp-eval/ test suite
  • Test against OpenAI function calling API to confirm acceptance

Fixes #14514

@saditya370 saditya370 self-assigned this Mar 25, 2026
@saditya370 saditya370 added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Mar 25, 2026
Copy link
Copy Markdown
Contributor

@wesleyjellis wesleyjellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewstillv15 says it looks good

@wesleyjellis wesleyjellis merged commit 6de4e41 into main Mar 31, 2026
2 checks passed
@wesleyjellis wesleyjellis deleted the fix/bump-mcp-go-schema-properties branch March 31, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants