@@ -11,7 +11,9 @@ struct ToolTests {
11
11
name: " test_tool " ,
12
12
description: " A test tool " ,
13
13
inputSchema: . object( [
14
- " param1 " : . string( " Test parameter " )
14
+ " properties " : . object( [
15
+ " param1 " : . string( " Test parameter " )
16
+ ] )
15
17
] )
16
18
)
17
19
@@ -100,7 +102,9 @@ struct ToolTests {
100
102
name: " calculate " ,
101
103
description: " Performs calculations " ,
102
104
inputSchema: . object( [
103
- " expression " : . string( " Mathematical expression to evaluate " )
105
+ " properties " : . object( [
106
+ " expression " : . string( " Mathematical expression to evaluate " )
107
+ ] )
104
108
] ) ,
105
109
annotations: annotations
106
110
)
@@ -131,23 +135,23 @@ struct ToolTests {
131
135
132
136
do {
133
137
#expect( tool. annotations. isEmpty)
134
-
138
+
135
139
let encoder = JSONEncoder ( )
136
140
let data = try encoder. encode ( tool)
137
-
141
+
138
142
// Verify that empty annotations are not included in the JSON
139
143
let jsonString = String ( data: data, encoding: . utf8) !
140
144
#expect( !jsonString. contains ( " \" annotations \" " ) )
141
145
}
142
-
146
+
143
147
do {
144
148
tool. annotations. title = " Test "
145
149
146
150
#expect( !tool. annotations. isEmpty)
147
-
151
+
148
152
let encoder = JSONEncoder ( )
149
153
let data = try encoder. encode ( tool)
150
-
154
+
151
155
// Verify that empty annotations are not included in the JSON
152
156
let jsonString = String ( data: data, encoding: . utf8) !
153
157
#expect( jsonString. contains ( " \" annotations \" " ) )
@@ -179,8 +183,10 @@ struct ToolTests {
179
183
name: " test_tool " ,
180
184
description: " Test tool description " ,
181
185
inputSchema: . object( [
182
- " param1 " : . string( " String parameter " ) ,
183
- " param2 " : . int( 42 ) ,
186
+ " properties " : . object( [
187
+ " param1 " : . string( " String parameter " ) ,
188
+ " param2 " : . int( 42 ) ,
189
+ ] )
184
190
] )
185
191
)
186
192
0 commit comments