Skip to content

Commit 3b60f5d

Browse files
committed
fix: namespaces_list always available
1 parent d74398f commit 3b60f5d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Diff for: pkg/mcp/namespaces.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ import (
99

1010
func (s *Server) initNamespaces() []server.ServerTool {
1111
ret := make([]server.ServerTool, 0)
12+
ret = append(ret, server.ServerTool{
13+
Tool: mcp.NewTool("namespaces_list",
14+
mcp.WithDescription("List all the Kubernetes namespaces in the current cluster"),
15+
), Handler: s.namespacesList,
16+
})
1217
if s.k.IsOpenShift(context.Background()) {
1318
ret = append(ret, server.ServerTool{
1419
Tool: mcp.NewTool("projects_list",
1520
mcp.WithDescription("List all the OpenShift projects in the current cluster"),
1621
), Handler: s.projectsList,
1722
})
18-
} else {
19-
ret = append(ret, server.ServerTool{
20-
Tool: mcp.NewTool("namespaces_list",
21-
mcp.WithDescription("List all the Kubernetes namespaces in the current cluster"),
22-
), Handler: s.namespacesList,
23-
})
2423
}
2524
return ret
2625
}

0 commit comments

Comments
 (0)