@@ -98,7 +98,7 @@ func TestEndToEnd(t *testing.T) {
9898 Name : "greet" ,
9999 Description : "say hi" ,
100100 }, sayHi )
101- AddTool (s , & Tool {Name : "fail" , InputSchema : & jsonschema.Schema {}},
101+ AddTool (s , & Tool {Name : "fail" , InputSchema : & jsonschema.Schema {Type : "object" }},
102102 func (context.Context , * CallToolRequest , map [string ]any ) (* CallToolResult , any , error ) {
103103 return nil , nil , errTestFailure
104104 })
@@ -257,7 +257,7 @@ func TestEndToEnd(t *testing.T) {
257257 t .Errorf ("tools/call 'fail' mismatch (-want +got):\n %s" , diff )
258258 }
259259
260- s .AddTool (& Tool {Name : "T" , InputSchema : & jsonschema.Schema {}}, nopHandler )
260+ s .AddTool (& Tool {Name : "T" , InputSchema : & jsonschema.Schema {Type : "object" }}, nopHandler )
261261 waitForNotification (t , "tools" )
262262 s .RemoveTools ("T" )
263263 waitForNotification (t , "tools" )
@@ -697,7 +697,7 @@ func TestCancellation(t *testing.T) {
697697 return nil , nil , nil
698698 }
699699 cs , _ := basicConnection (t , func (s * Server ) {
700- AddTool (s , & Tool {Name : "slow" , InputSchema : & jsonschema.Schema {}}, slowRequest )
700+ AddTool (s , & Tool {Name : "slow" , InputSchema : & jsonschema.Schema {Type : "object" }}, slowRequest )
701701 })
702702 defer cs .Close ()
703703
@@ -1496,8 +1496,8 @@ func TestAddTool_DuplicateNoPanicAndNoDuplicate(t *testing.T) {
14961496 // Use two distinct Tool instances with the same name but different
14971497 // descriptions to ensure the second replaces the first
14981498 // This case was written specifically to reproduce a bug where duplicate tools where causing jsonschema errors
1499- t1 := & Tool {Name : "dup" , Description : "first" , InputSchema : & jsonschema.Schema {}}
1500- t2 := & Tool {Name : "dup" , Description : "second" , InputSchema : & jsonschema.Schema {}}
1499+ t1 := & Tool {Name : "dup" , Description : "first" , InputSchema : & jsonschema.Schema {Type : "object" }}
1500+ t2 := & Tool {Name : "dup" , Description : "second" , InputSchema : & jsonschema.Schema {Type : "object" }}
15011501 s .AddTool (t1 , nopHandler )
15021502 s .AddTool (t2 , nopHandler )
15031503 })
0 commit comments