Skip to content

Commit 2ef7d42

Browse files
findleyrgopherbot
authored andcommitted
gopls: update Go MCP SDK to v0.5.0
This SDK version fixed several issues related to validation, which turned up a couple bugs in gopls: - A test was passing the wrong case for an argument. - The vulncheck command arguments were not actually optional, despite their documentation. Change-Id: I227163f3782f7bff89d8ce1201fbfa07bbbd8b52 Reviewed-on: https://go-review.googlesource.com/c/tools/+/703355 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ethan Lee <ethanalee@google.com> Reviewed-by: Madeline Kalil <mkalil@google.com> Auto-Submit: Robert Findley <rfindley@google.com>
1 parent 839d88e commit 2ef7d42

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

gopls/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/fsnotify/fsnotify v1.9.0
88
github.com/google/go-cmp v0.7.0
99
github.com/jba/templatecheck v0.7.1
10-
github.com/modelcontextprotocol/go-sdk v0.4.0
10+
github.com/modelcontextprotocol/go-sdk v0.5.0
1111
golang.org/x/mod v0.28.0
1212
golang.org/x/sync v0.17.0
1313
golang.org/x/telemetry v0.0.0-20250908211612-aef8a434d053
@@ -24,7 +24,7 @@ require (
2424
github.com/BurntSushi/toml v1.5.0 // indirect
2525
github.com/fatih/camelcase v1.0.0 // indirect
2626
github.com/fatih/structtag v1.2.0 // indirect
27-
github.com/google/jsonschema-go v0.2.1-0.20250825175020-748c325cec76 // indirect
27+
github.com/google/jsonschema-go v0.2.3 // indirect
2828
github.com/google/safehtml v0.1.0 // indirect
2929
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
3030
golang.org/x/exp/typeparams v0.0.0-20250819193227-8b4c13bb791b // indirect

gopls/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZs
1313
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1414
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
1515
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
16-
github.com/google/jsonschema-go v0.2.1-0.20250825175020-748c325cec76 h1:mBlBwtDebdDYr+zdop8N62a44g+Nbv7o2KjWyS1deR4=
17-
github.com/google/jsonschema-go v0.2.1-0.20250825175020-748c325cec76/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE=
16+
github.com/google/jsonschema-go v0.2.3 h1:dkP3B96OtZKKFvdrUSaDkL+YDx8Uw9uC4Y+eukpCnmM=
17+
github.com/google/jsonschema-go v0.2.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE=
1818
github.com/google/safehtml v0.1.0 h1:EwLKo8qawTKfsi0orxcQAZzu07cICaBeFMegAU9eaT8=
1919
github.com/google/safehtml v0.1.0/go.mod h1:L4KWwDsUJdECRAEpZoBn3O64bQaywRscowZjJAzjHnU=
2020
github.com/jba/templatecheck v0.7.1 h1:yOEIFazBEwzdTPYHZF3Pm81NF1ksxx1+vJncSEwvjKc=
@@ -23,8 +23,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
2323
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
2424
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
2525
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
26-
github.com/modelcontextprotocol/go-sdk v0.4.0 h1:RJ6kFlneHqzTKPzlQqiunrz9nbudSZcYLmLHLsokfoU=
27-
github.com/modelcontextprotocol/go-sdk v0.4.0/go.mod h1:whv0wHnsTphwq7CTiKYHkLtwLC06WMoY2KpO+RB9yXQ=
26+
github.com/modelcontextprotocol/go-sdk v0.5.0 h1:WXRHx/4l5LF5MZboeIJYn7PMFCrMNduGGVapYWFgrF8=
27+
github.com/modelcontextprotocol/go-sdk v0.5.0/go.mod h1:degUj7OVKR6JcYbDF+O99Fag2lTSTbamZacbGTRTSGU=
2828
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
2929
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
3030
github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4=

gopls/internal/mcp/vulncheck.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
)
1818

1919
type vulncheckParams struct {
20-
Dir string `json:"dir" jsonschema:"directory to run the vulnerability check within"`
21-
Pattern string `json:"pattern" jsonschema:"package pattern to check"`
20+
Dir string `json:"dir,omitempty" jsonschema:"directory to run the vulnerability check within"`
21+
Pattern string `json:"pattern,omitempty" jsonschema:"package pattern to check"`
2222
}
2323

2424
type GroupedVulnFinding struct {

gopls/internal/test/marker/testdata/mcptools/package_api.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This test exercises the "go_package_api" MCP tool.
66
-- go.mod --
77
module example.com/mod
88

9-
//@mcptool("go_package_api", `{"PackagePaths":["example.com/mod/lib"]}`, output=outline)
9+
//@mcptool("go_package_api", `{"packagePaths":["example.com/mod/lib"]}`, output=outline)
1010

1111
go 1.21
1212

0 commit comments

Comments
 (0)