File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ func TestShellCallCommand(t *testing.T) {
187187 name : "tool_name without params" ,
188188 input : "test-tool\n /q\n " ,
189189 expectedOutputs : []string {"Tool executed successfully" },
190- expectedParams : map [string ]any {"name" : "test-tool" },
190+ expectedParams : map [string ]any {"name" : "test-tool" , "arguments" : map [ string ] any {} },
191191 mockResponses : map [string ]map [string ]any {
192192 "tools/call" : {
193193 "content" : []any {map [string ]any {"type" : "text" , "text" : "Tool executed successfully" }},
@@ -198,7 +198,7 @@ func TestShellCallCommand(t *testing.T) {
198198 name : "call tool without params" ,
199199 input : "call test-tool\n /q\n " ,
200200 expectedOutputs : []string {"Tool executed successfully" },
201- expectedParams : map [string ]any {"name" : "test-tool" },
201+ expectedParams : map [string ]any {"name" : "test-tool" , "arguments" : map [ string ] any {} },
202202 mockResponses : map [string ]map [string ]any {
203203 "tools/call" : {
204204 "content" : []any {map [string ]any {"type" : "text" , "text" : "Tool executed successfully" }},
Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ func (m *MockTransport) Close() error {
5454 return nil
5555}
5656
57+ // GetSessionId is a no-op for the mock transport.
58+ func (m * MockTransport ) GetSessionId () string { //nolint:revive // GetSessionId required for interface.
59+ return ""
60+ }
61+
5762// setupMockClient creates a mock client with the given execute function and returns cleanup function.
5863func setupMockClient (executeFunc func (method string , _ any ) (map [string ]any , error )) func () {
5964 // Save original function and restore later
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/f/mcptools
33go 1.24.1
44
55require (
6- github.com/mark3labs/mcp-go v0.24.1
6+ github.com/mark3labs/mcp-go v0.34.0
77 github.com/peterh/liner v1.2.2
88 github.com/spf13/cobra v1.9.1
99 github.com/spf13/viper v1.20.1
Original file line number Diff line number Diff line change @@ -18,10 +18,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
1818github.com/kr/pretty v0.3.1 /go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk =
1919github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY =
2020github.com/kr/text v0.2.0 /go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE =
21- github.com/mark3labs/mcp-go v0.23.1 h1:RzTzZ5kJ+HxwnutKA4rll8N/pKV6Wh5dhCmiJUu5S9I =
22- github.com/mark3labs/mcp-go v0.23.1 /go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4 =
23- github.com/mark3labs/mcp-go v0.24.1 h1:YV+5X/+W4oBdERLWgiA1uR7AIvenlKJaa5V4hqufI7E =
24- github.com/mark3labs/mcp-go v0.24.1 /go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4 =
21+ github.com/mark3labs/mcp-go v0.34.0 h1:eWy7WBGvhk6EyAAyVzivTCprE52iXJwNtvHV6Cv3bR0 =
22+ github.com/mark3labs/mcp-go v0.34.0 /go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4 =
2523github.com/mattn/go-runewidth v0.0.3 /go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU =
2624github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc =
2725github.com/mattn/go-runewidth v0.0.16 /go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w =
You can’t perform that action at this time.
0 commit comments