Merge pull request #445 from rickreyhsig-wealthbox/client-tool-annotations
Expose server tool annotations on MCP::Client::Tool
This commit is contained in:
commit
5a879b3678
1 changed files with 27 additions and 2 deletions
|
|
@ -124,6 +124,7 @@ module MCP
|
|||
"description" => "tool1",
|
||||
"inputSchema" => {},
|
||||
"outputSchema" => { "type" => "object", "properties" => { "result" => { "type" => "string" } } },
|
||||
"annotations" => { "readOnlyHint" => true, "title" => "Tool One" },
|
||||
},
|
||||
{ "name" => "tool2", "description" => "tool2", "inputSchema" => {} },
|
||||
],
|
||||
|
|
@ -141,8 +142,10 @@ module MCP
|
|||
assert_equal(2, tools.size)
|
||||
assert_equal("tool1", tools.first.name)
|
||||
assert_equal({ "type" => "object", "properties" => { "result" => { "type" => "string" } } }, tools.first.output_schema)
|
||||
assert_equal({ "readOnlyHint" => true, "title" => "Tool One" }, tools.first.annotations)
|
||||
assert_equal("tool2", tools.last.name)
|
||||
assert_nil(tools.last.output_schema)
|
||||
assert_nil(tools.last.annotations)
|
||||
end
|
||||
|
||||
def test_tools_returns_empty_array_when_no_tools
|
||||
|
|
|
|||
Loading…
Reference in a new issue