Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.24.0
require (
github.com/davecgh/go-spew v1.1.1
github.com/fsnotify/fsnotify v1.9.0
github.com/mark3labs/mcp-go v0.25.0
github.com/mark3labs/mcp-go v0.28.0
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/stretchr/testify v1.10.0
golang.org/x/text v0.25.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mark3labs/mcp-go v0.25.0 h1:UUpcMT3L5hIhuDy7aifj4Bphw4Pfx1Rf8mzMXDe8RQw=
github.com/mark3labs/mcp-go v0.25.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
github.com/mark3labs/mcp-go v0.28.0 h1:7yl4y5D1KYU2f/9Uxp7xfLIggfunHoESCRbrjcytcLM=
github.com/mark3labs/mcp-go v0.28.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
Expand Down
12 changes: 12 additions & 0 deletions tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ func (s *mcpServer) registerTools() error {

applyTextEditTool := mcp.NewTool("edit_file",
mcp.WithDescription("Apply multiple text edits to a file."),
mcp.WithTitleAnnotation("Edit File"),
mcp.WithDestructiveHintAnnotation(true),
mcp.WithArray("edits",
mcp.Required(),
mcp.Description("List of edits to apply"),
Expand Down Expand Up @@ -97,6 +99,8 @@ func (s *mcpServer) registerTools() error {

readDefinitionTool := mcp.NewTool("definition",
mcp.WithDescription("Read the source code definition of a symbol (function, type, constant, etc.) from the codebase. Returns the complete implementation code where the symbol is defined."),
mcp.WithTitleAnnotation("Go to Definition"),
mcp.WithReadOnlyHintAnnotation(true),
mcp.WithString("symbolName",
mcp.Required(),
mcp.Description("The name of the symbol whose definition you want to find (e.g. 'mypackage.MyFunction', 'MyType.MyMethod')"),
Expand All @@ -121,6 +125,8 @@ func (s *mcpServer) registerTools() error {

findReferencesTool := mcp.NewTool("references",
mcp.WithDescription("Find all usages and references of a symbol throughout the codebase. Returns a list of all files and locations where the symbol appears."),
mcp.WithTitleAnnotation("Find References"),
mcp.WithReadOnlyHintAnnotation(true),
mcp.WithString("symbolName",
mcp.Required(),
mcp.Description("The name of the symbol to search for (e.g. 'mypackage.MyFunction', 'MyType')"),
Expand All @@ -145,6 +151,8 @@ func (s *mcpServer) registerTools() error {

getDiagnosticsTool := mcp.NewTool("diagnostics",
mcp.WithDescription("Get diagnostic information for a specific file from the language server."),
mcp.WithTitleAnnotation("Get Diagnostics"),
mcp.WithReadOnlyHintAnnotation(true),
mcp.WithString("filePath",
mcp.Required(),
mcp.Description("The path to the file to get diagnostics for"),
Expand Down Expand Up @@ -252,6 +260,8 @@ func (s *mcpServer) registerTools() error {

hoverTool := mcp.NewTool("hover",
mcp.WithDescription("Get hover information (type, documentation) for a symbol at the specified position."),
mcp.WithTitleAnnotation("Hover Information"),
mcp.WithReadOnlyHintAnnotation(true),
mcp.WithString("filePath",
mcp.Required(),
mcp.Description("The path to the file to get hover information for"),
Expand Down Expand Up @@ -304,6 +314,8 @@ func (s *mcpServer) registerTools() error {

renameSymbolTool := mcp.NewTool("rename_symbol",
mcp.WithDescription("Rename a symbol (variable, function, class, etc.) at the specified position and update all references throughout the codebase."),
mcp.WithTitleAnnotation("Rename Symbol"),
mcp.WithDestructiveHintAnnotation(true),
mcp.WithString("filePath",
mcp.Required(),
mcp.Description("The path to the file containing the symbol to rename"),
Expand Down