Skip to content

Commit 88c5b6e

Browse files
committed
improve descriptions
1 parent ba083c2 commit 88c5b6e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/server/tools.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ func (s *server) registerTools() error {
1111

1212
err := s.mcpServer.RegisterTool(
1313
"read-definition",
14-
"Read the source code for a given symbol from the codebase",
15-
func(args tools.GetDefinitionArgs) (*mcp_golang.ToolResponse, error) {
14+
"Read the source code for a given symbol from the codebase.",
15+
func(args tools.ReadDefinitionArgs) (*mcp_golang.ToolResponse, error) {
1616
text, err := tools.ReadDefinition(s.ctx, s.lspClient, args)
1717
if err != nil {
1818
return nil, fmt.Errorf("Failed to get definition: %v", err)
@@ -25,7 +25,7 @@ func (s *server) registerTools() error {
2525

2626
err = s.mcpServer.RegisterTool(
2727
"apply-text-edit",
28-
"Apply multiple text edits to a file.",
28+
"Apply multiple text edits to a file. WARNING: line numbers may change between calls to this tool.",
2929
func(args tools.ApplyTextEditArgs) (*mcp_golang.ToolResponse, error) {
3030
response, err := tools.ApplyTextEdits(args)
3131
if err != nil {

internal/tools/apply-text-edit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type TextEdit struct {
2222
Type TextEditType `json:"type" jsonschema:"required,enum=replace|insert|delete,description=Type of edit operation (replace, insert, delete)"`
2323
StartLine int `json:"startLine" jsonschema:"required,description=Start line to replace, inclusive"`
2424
EndLine int `json:"endLine" jsonschema:"required,description=End line to replace, inclusive"`
25-
NewText string `json:"newText" jsonschema:"description=Replacement text (optional)"`
25+
NewText string `json:"newText" jsonschema:"description=Replacement text. Leave blank to clear lines."`
2626
}
2727

2828
type ApplyTextEditArgs struct {

0 commit comments

Comments
 (0)