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 fbac167 commit 2b5060fCopy full SHA for 2b5060f
mcp/tools.go
@@ -125,12 +125,14 @@ func (t *Tool) UnmarshalJSON(b []byte) error {
125
126
// Try to unmarshal InputSchema into structured format
127
var schema ToolInputSchema
128
- if err := json.Unmarshal(raw.InputSchema, &schema); err == nil {
+ if err := json.Unmarshal(raw.InputSchema, &schema); err == nil && schema.Type != "" {
129
// Successfully parsed structured schema
130
t.InputSchema = schema
131
t.RawInputSchema = nil
132
} else {
133
- return err
+ // Failed to parse structured schema, use raw schema
134
+ t.InputSchema = ToolInputSchema{}
135
+ t.RawInputSchema = raw.InputSchema
136
}
137
138
return nil
0 commit comments