We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3964d51 commit 5ad6c8dCopy full SHA for 5ad6c8d
mcp/tools.go
@@ -585,6 +585,7 @@ func (t Tool) MarshalJSON() ([]byte, error) {
585
}
586
587
type ToolInputSchema struct {
588
+ Defs map[string]any `json:"$defs,omitempty"`
589
Type string `json:"type"`
590
Properties map[string]any `json:"properties,omitempty"`
591
Required []string `json:"required,omitempty"`
@@ -595,6 +596,10 @@ func (tis ToolInputSchema) MarshalJSON() ([]byte, error) {
595
596
m := make(map[string]any)
597
m["type"] = tis.Type
598
599
+ if tis.Defs != nil {
600
+ m["$defs"] = tis.Defs
601
+ }
602
+
603
// Marshal Properties to '{}' rather than `nil` when its length equals zero
604
if tis.Properties != nil {
605
m["properties"] = tis.Properties
0 commit comments