@@ -15,7 +15,7 @@ class TestTool < Tool
1515 read_only_hint : true ,
1616 title : "Test Tool" ,
1717 )
18- metadata (
18+ meta (
1919 foo : "bar" ,
2020 )
2121
@@ -55,12 +55,12 @@ def call(message:, server_context: nil)
5555 assert_equal expected_annotations , tool . to_h [ :annotations ]
5656 end
5757
58- test "#to_h includes metadata when present" do
58+ test "#to_h includes meta when present" do
5959 tool = TestTool
60- expected_metadata = {
60+ expected_meta = {
6161 foo : "bar" ,
6262 }
63- assert_equal expected_metadata , tool . to_h [ :_meta ]
63+ assert_equal expected_meta , tool . to_h [ :_meta ]
6464 end
6565
6666 test "#call invokes the tool block and returns the response" do
@@ -163,12 +163,12 @@ class InputSchemaTool < Tool
163163 assert_equal ( { destructiveHint : true , idempotentHint : false , openWorldHint : true , readOnlyHint : true , title : "Mock Tool" } , tool . annotations_value . to_h )
164164 end
165165
166- test ".define allows definition of tools with metadata " do
166+ test ".define allows definition of tools with meta " do
167167 tool = Tool . define (
168168 name : "mock_tool" ,
169169 title : "Mock Tool" ,
170170 description : "a mock tool for testing" ,
171- metadata : { foo : "bar" } ,
171+ meta : { foo : "bar" } ,
172172 ) do |_ |
173173 Tool ::Response . new ( [ { type : "text" , content : "OK" } ] )
174174 end
@@ -177,7 +177,7 @@ class InputSchemaTool < Tool
177177 assert_equal "Mock Tool" , tool . title
178178 assert_equal "a mock tool for testing" , tool . description
179179 assert_equal tool . input_schema , Tool ::InputSchema . new
180- assert_equal ( { foo : "bar" } , tool . metadata_value )
180+ assert_equal ( { foo : "bar" } , tool . meta_value )
181181 end
182182
183183 test "Tool class method annotations can be set and retrieved" do
@@ -208,28 +208,28 @@ class UpdatableAnnotationsTool < Tool
208208 assert_equal "Updated" , tool . annotations_value . title
209209 end
210210
211- test "Tool class method metadata can be set and retrieved" do
212- class MetadataTestTool < Tool
213- tool_name "annotations_test "
214- metadata ( foo : "bar" )
211+ test "Tool class method meta can be set and retrieved" do
212+ class MetaTestTool < Tool
213+ tool_name "meta_test "
214+ meta ( foo : "bar" )
215215 end
216216
217- tool = MetadataTestTool
218- assert_instance_of Hash , tool . metadata_value
219- assert_equal "bar" , tool . metadata_value [ :foo ]
217+ tool = MetaTestTool
218+ assert_instance_of Hash , tool . meta_value
219+ assert_equal "bar" , tool . meta_value [ :foo ]
220220 end
221221
222- test "Tool class method metadata can be updated" do
223- class UpdatableMetadataTool < Tool
224- tool_name "updatable_metadata "
222+ test "Tool class method meta can be updated" do
223+ class UpdatableMetaTool < Tool
224+ tool_name "updatable_meta "
225225 end
226226
227- tool = UpdatableMetadataTool
228- tool . metadata ( foo : "baz" )
229- assert_equal ( { foo : "baz" } , tool . metadata_value )
227+ tool = UpdatableMetaTool
228+ tool . meta ( foo : "baz" )
229+ assert_equal ( { foo : "baz" } , tool . meta_value )
230230
231- tool . metadata ( foo : "qux" )
232- assert_equal ( { foo : "qux" } , tool . metadata_value )
231+ tool . meta ( foo : "qux" )
232+ assert_equal ( { foo : "qux" } , tool . meta_value )
233233 end
234234
235235 test "#call with Sorbet typed tools invokes the tool block and returns the response" do
0 commit comments