Skip to content

Commit 4f1752e

Browse files
committed
fix: small changes from local testing
Signed-off-by: Calum Murray <[email protected]>
1 parent 3ae3491 commit 4f1752e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pkg/mcp/mcp.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (s *Server) reloadKubernetesClusterProvider() error {
132132
p.GetDefaultTarget(),
133133
p.GetTargetParameterName(),
134134
targets,
135-
[]string{"configuration_view"}, // TODO: see which tools (if any) do not need the cluster parameter
135+
[]string{"configuration_view", "contexts_list"}, // TODO: see which tools (if any) do not need the cluster parameter
136136
)
137137

138138
applicableTools := make([]api.ServerTool, 0)
@@ -153,6 +153,9 @@ func (s *Server) reloadKubernetesClusterProvider() error {
153153
}
154154

155155
s.server.SetTools(m3labsServerTools...)
156+
157+
// start new watch
158+
s.p.WatchTargets(s.reloadKubernetesClusterProvider)
156159
return nil
157160
}
158161

pkg/mcp/tool_mutator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
type ToolMutator func(tool api.ServerTool) api.ServerTool
1212

13-
const maxTargetsInEnum = 15 // TODO: test and validate that this is a reasonable cutoff
13+
const maxTargetsInEnum = 5 // TODO: test and validate that this is a reasonable cutoff
1414

1515
func WithTargetParameter(defaultCluster, targetParameterName string, targets, skipToolNames []string) ToolMutator {
1616
skipNames := make(map[string]struct{}, len(skipToolNames))

0 commit comments

Comments
 (0)