File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 22
33module MCP
44 class Client
5- JSON_RPC_VERSION = "2.0"
6-
75 # Initializes a new MCP::Client instance.
86 #
97 # @param transport [Object] The transport object to use for communication with the server.
@@ -38,7 +36,7 @@ def initialize(transport:)
3836 # end
3937 def tools
4038 response = transport . send_request ( request : {
41- jsonrpc : JSON_RPC_VERSION ,
39+ jsonrpc : JsonRpcHandler :: Version :: V2_0 ,
4240 id : request_id ,
4341 method : "tools/list" ,
4442 } )
@@ -67,7 +65,7 @@ def tools
6765 # Consult the documentation for your transport (e.g., MCP::Client::HTTP) for details.
6866 def call_tool ( tool :, arguments : nil )
6967 response = transport . send_request ( request : {
70- jsonrpc : JSON_RPC_VERSION ,
68+ jsonrpc : JsonRpcHandler :: Version :: V2_0 ,
7169 id : request_id ,
7270 method : "tools/call" ,
7371 params : { name : tool . name , arguments : arguments } ,
You can’t perform that action at this time.
0 commit comments