Skip to content

Commit 2cc5f52

Browse files
authored
refactor(mcp): encapsulate non-exported constants Name, Title, Version (#3171)
1 parent 207573a commit 2cc5f52

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

pkg/mcp/mcp.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
)
1111

1212
const (
13-
Name = "func"
14-
Title = "func"
15-
Version = "0.1.0"
13+
name = "func"
14+
title = "func"
15+
version = "0.1.0"
1616
)
1717

1818
// NOTE: Invoking prompts in some interfaces (such as Claude Code) when all
@@ -77,9 +77,9 @@ func New(options ...Option) *Server {
7777

7878
i := mcp.NewServer(
7979
&mcp.Implementation{
80-
Name: Name,
81-
Title: Title,
82-
Version: Version},
80+
Name: name,
81+
Title: title,
82+
Version: version},
8383
&mcp.ServerOptions{
8484
Instructions: instructions(s.readonly),
8585
HasPrompts: true,
@@ -158,7 +158,7 @@ func (e defaultExecutor) Execute(ctx context.Context, subcommand string, args ..
158158
cmdParts = append(cmdParts, args...)
159159

160160
cmd := exec.CommandContext(ctx, cmdParts[0], cmdParts[1:]...)
161-
// Commands always execute in current working directory
161+
// cmd.Dir not set - inherits process working directory which is the current working directory
162162
return cmd.CombinedOutput()
163163
}
164164

0 commit comments

Comments
 (0)