Thank you for creating a great go mcp SDK.
in protocol module, the declaration of InputSchema is:
type InputSchema struct {
Type InputSchemaType `json:"type"`
Properties map[string]*Property `json:"properties,omitempty"`
Required []string `json:"required,omitempty"`
}
I used the Client SDK to communicate with LLM, during my development I found that when a remote tool params is blank, the protocol.InputSchema will omit the Properties, the generated JSON string is illegal for OpenAI tool calling json schema.
for now, the blank param schema is:
the expected params format which could be accepted by OpenAI api is:
{
"type": "object",
"properties": {}
}
Could you remove the omitempty tag of Promperties?
Thank you for creating a great go mcp SDK.
in protocol module, the declaration of InputSchema is:
I used the Client SDK to communicate with LLM, during my development I found that when a remote tool params is blank, the
protocol.InputSchemawill omit the Properties, the generated JSON string is illegal for OpenAI tool calling json schema.for now, the blank param schema is:
{ "type": "object" }the expected params format which could be accepted by OpenAI api is:
{ "type": "object", "properties": {} }Could you remove the
omitemptytag of Promperties?