@@ -11,7 +11,9 @@ struct ToolTests {
1111 name: " test_tool " ,
1212 description: " A test tool " ,
1313 inputSchema: . object( [
14- " param1 " : . string( " Test parameter " )
14+ " properties " : . object( [
15+ " param1 " : . string( " Test parameter " )
16+ ] )
1517 ] )
1618 )
1719
@@ -100,7 +102,9 @@ struct ToolTests {
100102 name: " calculate " ,
101103 description: " Performs calculations " ,
102104 inputSchema: . object( [
103- " expression " : . string( " Mathematical expression to evaluate " )
105+ " properties " : . object( [
106+ " expression " : . string( " Mathematical expression to evaluate " )
107+ ] )
104108 ] ) ,
105109 annotations: annotations
106110 )
@@ -131,23 +135,23 @@ struct ToolTests {
131135
132136 do {
133137 #expect( tool. annotations. isEmpty)
134-
138+
135139 let encoder = JSONEncoder ( )
136140 let data = try encoder. encode ( tool)
137-
141+
138142 // Verify that empty annotations are not included in the JSON
139143 let jsonString = String ( data: data, encoding: . utf8) !
140144 #expect( !jsonString. contains ( " \" annotations \" " ) )
141145 }
142-
146+
143147 do {
144148 tool. annotations. title = " Test "
145149
146150 #expect( !tool. annotations. isEmpty)
147-
151+
148152 let encoder = JSONEncoder ( )
149153 let data = try encoder. encode ( tool)
150-
154+
151155 // Verify that empty annotations are not included in the JSON
152156 let jsonString = String ( data: data, encoding: . utf8) !
153157 #expect( jsonString. contains ( " \" annotations \" " ) )
@@ -179,8 +183,10 @@ struct ToolTests {
179183 name: " test_tool " ,
180184 description: " Test tool description " ,
181185 inputSchema: . object( [
182- " param1 " : . string( " String parameter " ) ,
183- " param2 " : . int( 42 ) ,
186+ " properties " : . object( [
187+ " param1 " : . string( " String parameter " ) ,
188+ " param2 " : . int( 42 ) ,
189+ ] )
184190 ] )
185191 )
186192
0 commit comments