@@ -33,6 +33,24 @@ def test_output_schema_returns_nil_when_not_provided
3333 assert_nil ( @tool . output_schema )
3434 end
3535
36+ def test_annotations_returns_nil_when_not_provided
37+ assert_nil ( @tool . annotations )
38+ end
39+
40+ def test_annotations_returns_annotations_when_provided
41+ tool_with_annotations = Tool . new (
42+ name : "test_tool_with_annotations" ,
43+ description : "A test tool with annotations" ,
44+ input_schema : { "type" => "object" } ,
45+ annotations : { "readOnlyHint" => true , "title" => "Test Tool" } ,
46+ )
47+
48+ assert_equal (
49+ { "readOnlyHint" => true , "title" => "Test Tool" } ,
50+ tool_with_annotations . annotations ,
51+ )
52+ end
53+
3654 def test_output_schema_returns_output_schema_when_provided
3755 tool_with_output = Tool . new (
3856 name : "test_tool_with_output" ,
@@ -53,12 +71,14 @@ def test_initialization_with_all_parameters
5371 description : "A tool with all parameters" ,
5472 input_schema : { "type" => "object" } ,
5573 output_schema : { "type" => "object" , "properties" => { "status" => { "type" => "boolean" } } } ,
74+ annotations : { "readOnlyHint" => true } ,
5675 )
5776
5877 assert_equal ( "full_tool" , tool . name )
5978 assert_equal ( "A tool with all parameters" , tool . description )
6079 assert_equal ( { "type" => "object" } , tool . input_schema )
6180 assert_equal ( { "type" => "object" , "properties" => { "status" => { "type" => "boolean" } } } , tool . output_schema )
81+ assert_equal ( { "readOnlyHint" => true } , tool . annotations )
6282 end
6383 end
6484 end
0 commit comments