@@ -18,7 +18,7 @@ class TestTool < Tool
18
18
)
19
19
20
20
class << self
21
- def call ( message , server_context : nil )
21
+ def call ( message : , server_context : nil )
22
22
Tool ::Response . new ( [ { type : "text" , content : "OK" } ] )
23
23
end
24
24
end
@@ -43,7 +43,7 @@ def call(message, server_context: nil)
43
43
44
44
test "#call invokes the tool block and returns the response" do
45
45
tool = TestTool
46
- response = tool . call ( "test" )
46
+ response = tool . call ( message : "test" )
47
47
assert_equal response . content , [ { type : "text" , content : "OK" } ]
48
48
assert_equal response . is_error , false
49
49
end
@@ -210,26 +210,19 @@ class TypedTestTool < Tool
210
210
tool_name "test_tool"
211
211
description "a test tool for testing"
212
212
input_schema ( { properties : { message : { type : "string" } } , required : [ "message" ] } )
213
- annotations (
214
- title : "Test Tool" ,
215
- read_only_hint : true ,
216
- destructive_hint : false ,
217
- idempotent_hint : true ,
218
- open_world_hint : false ,
219
- )
220
213
221
214
class << self
222
215
extend T ::Sig
223
216
224
217
sig { params ( message : String , server_context : T . nilable ( T . untyped ) ) . returns ( Tool ::Response ) }
225
- def call ( message , server_context : nil )
218
+ def call ( message : , server_context : nil )
226
219
Tool ::Response . new ( [ { type : "text" , content : "OK" } ] )
227
220
end
228
221
end
229
222
end
230
223
231
224
tool = TypedTestTool
232
- response = tool . call ( "test" )
225
+ response = tool . call ( message : "test" )
233
226
assert_equal response . content , [ { type : "text" , content : "OK" } ]
234
227
assert_equal response . is_error , false
235
228
end
0 commit comments