Skip to content

Commit f83e561

Browse files
committed
remove duplicate mcp property
1 parent f3f13e4 commit f83e561

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

lib/mcp/client.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ def tools
4141
jsonrpc: JSON_RPC_VERSION,
4242
id: request_id,
4343
method: "tools/list",
44-
mcp: {
45-
jsonrpc: JSON_RPC_VERSION,
46-
id: request_id,
47-
method: "tools/list",
48-
}.compact,
4944
}
5045

5146
response = transport.send_request(request: request)
@@ -77,12 +72,6 @@ def call_tool(tool:, input: nil)
7772
id: request_id,
7873
method: "tools/call",
7974
params: { name: tool.name, arguments: input },
80-
mcp: {
81-
jsonrpc: JSON_RPC_VERSION,
82-
id: request_id,
83-
method: "tools/call",
84-
params: { name: tool.name, arguments: input },
85-
}.compact,
8675
}
8776

8877
response = transport.send_request(request: request)

test/mcp/client_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def test_tools_sends_request_to_transport_and_returns_tools_array
1919
# Only checking for the essential parts of the request
2020
transport.expects(:send_request).with do |args|
2121
args.dig(:request, :method) == "tools/list" &&
22-
args.dig(:request, :jsonrpc) == "2.0" &&
23-
args.dig(:request, :mcp, :method) == "tools/list"
22+
args.dig(:request, :jsonrpc) == "2.0"
2423
end.returns(mock_response).once
2524

2625
client = Client.new(transport: transport)

0 commit comments

Comments
 (0)