From 62a72f960be08d9359e20110222eb0b2f75aa922 Mon Sep 17 00:00:00 2001 From: Anurag Ojha Date: Fri, 7 Nov 2025 12:00:36 +0000 Subject: [PATCH] refactor(mcp): encapsulate non-exported constants Name, Title, Version --- pkg/mcp/mcp.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/mcp/mcp.go b/pkg/mcp/mcp.go index 76b28df13e..a44cd0c1e0 100644 --- a/pkg/mcp/mcp.go +++ b/pkg/mcp/mcp.go @@ -10,9 +10,9 @@ import ( ) const ( - Name = "func" - Title = "func" - Version = "0.1.0" + name = "func" + title = "func" + version = "0.1.0" ) // NOTE: Invoking prompts in some interfaces (such as Claude Code) when all @@ -77,9 +77,9 @@ func New(options ...Option) *Server { i := mcp.NewServer( &mcp.Implementation{ - Name: Name, - Title: Title, - Version: Version}, + Name: name, + Title: title, + Version: version}, &mcp.ServerOptions{ Instructions: instructions(s.readonly), HasPrompts: true, @@ -158,7 +158,7 @@ func (e defaultExecutor) Execute(ctx context.Context, subcommand string, args .. cmdParts = append(cmdParts, args...) cmd := exec.CommandContext(ctx, cmdParts[0], cmdParts[1:]...) - // Commands always execute in current working directory + // cmd.Dir not set - inherits process working directory which is the current working directory return cmd.CombinedOutput() }