Use Server#tools instead of instance_variable_get
Follow-up to https://github.com/modelcontextprotocol/ruby-sdk/pull/301#discussion_r3046699277. `Server#tools` method can be used instead of a hack like `instance_variable_get(:@tools)`.
This commit is contained in:
parent
811c56ae80
commit
25f3f9a33a
1 changed files with 1 additions and 1 deletions
|
|
@ -1390,7 +1390,7 @@ module MCP
|
|||
Tool::Response.new({ "response" => message })
|
||||
end
|
||||
|
||||
stored_tool = @server.instance_variable_get(:@tools)["defined_tool"]
|
||||
stored_tool = @server.tools["defined_tool"]
|
||||
assert_not_nil(stored_tool)
|
||||
assert_equal(MCP::Tool::OutputSchema.new({ type: "object", properties: { response: { type: "string" } }, required: ["response"] }), stored_tool.output_schema)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue