Fix tool schema compatibility with OpenAI models#847
Open
edcdavid wants to merge 1 commit intocontainers:mainfrom
Open
Fix tool schema compatibility with OpenAI models#847edcdavid wants to merge 1 commit intocontainers:mainfrom
edcdavid wants to merge 1 commit intocontainers:mainfrom
Conversation
OpenAI models require the "properties" field to be present in the JSON schema for tool input, even when a tool takes no parameters. Add an empty properties map to the configuration_contexts_list and targets_list tool schemas to ensure compatibility. Assisted by: Cursor
This was referenced Feb 27, 2026
manusa
reviewed
Feb 28, 2026
Member
manusa
left a comment
There was a problem hiding this comment.
Hi @edcdavid, thx for getting involved.
This is not a proper fix.
The toolset definition gets transformed in a latter stage at the MCP domain layer, so whatever you change here, doesn't mean that it will be sent to the MCP client and host.
This issue (#717) was already fixed, first in this repository, and later in the go-sdk directly.
We have specific tests to ensure that this is the case:
kubernetes-mcp-server/pkg/mcp/toolsets_test.go
Lines 195 to 225 in b371f49
Are you using the latest version of the server.
If you are, and are still facing the issue, try to provide a reproducer first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenAI models require the "properties" field to be present in the JSON schema for tool input, even when a tool takes no parameters. Add an empty properties map to the configuration_contexts_list and targets_list tool schemas to ensure compatibility.
Assisted by: Cursor