[tools] gopls/internal/mcp: add a symbol search tool

1 view
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jul 8, 2025, 2:57:11 PM7/8/25
to Robert Findley, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Hongxiang Jiang, Madeline Kalil, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
gopls/internal/mcp: add a symbol search tool

Add a tool that wraps workspace symbol search.
Also, factor out text content handling.

Also fix a build breakage due to semantic merge conflict.

For golang/go#73580
Change-Id: I42a0f2a5445f5492506ff5a07778a310ed485c54
Auto-Submit: Robert Findley <rfin...@google.com>
Reviewed-by: Hongxiang Jiang <hxj...@golang.org>
Reviewed-by: Madeline Kalil <mka...@google.com>
Files:
  • M gopls/internal/cmd/mcp.go
  • M gopls/internal/mcp/context.go
  • M gopls/internal/mcp/diagnostics.go
  • M gopls/internal/mcp/file_metadata.go
  • M gopls/internal/mcp/mcp.go
  • M gopls/internal/mcp/references.go
  • A gopls/internal/mcp/search.go
  • M gopls/internal/mcp/workspace.go
  • M gopls/internal/mcp/workspace_diagnostics.go
  • A gopls/internal/test/marker/testdata/mcptools/search.txt
Change size: M
Delta: 10 files changed, 152 insertions(+), 29 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Madeline Kalil, +2 by Hongxiang Jiang
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I42a0f2a5445f5492506ff5a07778a310ed485c54
Gerrit-Change-Number: 686535
Gerrit-PatchSet: 3
Gerrit-Owner: Robert Findley <rfin...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
Gerrit-Reviewer: Robert Findley <rfin...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages