Skip to content

Commit 9090cb6

Browse files
authored
Merge pull request #340 from koic/use_server_tools_instead_of_instance_variable_get
Use `Server#tools` instead of `instance_variable_get`
2 parents e47607d + 25f3f9a commit 9090cb6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/mcp/server_test.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ class Example < Tool
13901390
Tool::Response.new({ "response" => message })
13911391
end
13921392

1393-
stored_tool = @server.instance_variable_get(:@tools)["defined_tool"]
1393+
stored_tool = @server.tools["defined_tool"]
13941394
assert_not_nil(stored_tool)
13951395
assert_equal(MCP::Tool::OutputSchema.new({ type: "object", properties: { response: { type: "string" } }, required: ["response"] }), stored_tool.output_schema)
13961396

0 commit comments

Comments
 (0)