Skip to content

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

Open
saditya370 wants to merge 1 commit intomainfrom
fix/bump-mcp-go-schema-properties
Open

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

Conversation

@saditya370
Copy link

@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
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.

1 participant