File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -516,9 +516,10 @@ func (t Tool) MarshalJSON() ([]byte, error) {
516516}
517517
518518type ToolInputSchema struct {
519- Type string `json:"type"`
520- Properties map [string ]any `json:"properties,omitempty"`
521- Required []string `json:"required,omitempty"`
519+ Type string `json:"type"`
520+ Properties map [string ]any `json:"properties,omitempty"`
521+ Required []string `json:"required,omitempty"`
522+ Definitions map [string ]ToolInputSchema `json:"$defs,omitempty"`
522523}
523524
524525// MarshalJSON implements the json.Marshaler interface for ToolInputSchema.
@@ -535,6 +536,10 @@ func (tis ToolInputSchema) MarshalJSON() ([]byte, error) {
535536 m ["required" ] = tis .Required
536537 }
537538
539+ if len (tis .Definitions ) > 0 {
540+ m ["$defs" ] = tis .Definitions
541+ }
542+
538543 return json .Marshal (m )
539544}
540545
You can’t perform that action at this time.
0 commit comments