Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,21 +204,19 @@ Enabling only the toolsets you need can help reduce the context size and improve

### Available Toolsets

The following sets of tools are available (all on by default).
The following sets of tools are available (toolsets marked with ✓ in the Default column are enabled by default):

<!-- AVAILABLE-TOOLSETS-START -->

| Toolset | Description |
|---------|-------------------------------------------------------------------------------------|
| config | View and manage the current local Kubernetes configuration (kubeconfig) |
| core | Most common tools for Kubernetes management (Pods, Generic Resources, Events, etc.) |
| helm | Tools for managing Helm charts and releases |
| kiali | Most common tools for managing Kiali |
| Toolset | Description | Default |
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| config | View and manage the current local Kubernetes configuration (kubeconfig) | ✓ |
| core | Most common tools for Kubernetes management (Pods, Generic Resources, Events, etc.) | ✓ |
| helm | Tools for managing Helm charts and releases | ✓ |
| kiali | Most common tools for managing Kiali, check the [Kiali integration documentation](https://github.com/containers/kubernetes-mcp-server/blob/main/docs/KIALI_INTEGRATION.md) for more details. | |

<!-- AVAILABLE-TOOLSETS-END -->

See more info about Kiali integration in [docs/KIALI_INTEGRATION.md](docs/KIALI_INTEGRATION.md).

### Tools

In case multi-cluster support is enabled (default) and you have access to multiple clusters, all applicable tools will include an additional `context` argument to specify the Kubernetes context (cluster) to use for that operation.
Expand Down
22 changes: 18 additions & 4 deletions internal/tools/update-readme/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"slices"
"strings"

"github.com/containers/kubernetes-mcp-server/pkg/config"
internalk8s "github.com/containers/kubernetes-mcp-server/pkg/kubernetes"
"github.com/containers/kubernetes-mcp-server/pkg/toolsets"

Expand All @@ -20,7 +21,7 @@ import (

type OpenShift struct{}

func (o *OpenShift) IsOpenShift(ctx context.Context) bool {
func (o *OpenShift) IsOpenShift(_ context.Context) bool {
return true
}

Expand All @@ -40,7 +41,16 @@ func main() {
}
// Available Toolsets
toolsetsList := toolsets.Toolsets()

// Get default enabled toolsets
defaultConfig := config.Default()
defaultToolsetsMap := make(map[string]bool)
for _, toolsetName := range defaultConfig.Toolsets {
defaultToolsetsMap[toolsetName] = true
}

maxNameLen, maxDescLen := len("Toolset"), len("Description")
defaultHeaderLen := len("Default")
for _, toolset := range toolsetsList {
nameLen := len(toolset.GetName())
descLen := len(toolset.GetDescription())
Expand All @@ -52,10 +62,14 @@ func main() {
}
}
availableToolsets := strings.Builder{}
availableToolsets.WriteString(fmt.Sprintf("| %-*s | %-*s |\n", maxNameLen, "Toolset", maxDescLen, "Description"))
availableToolsets.WriteString(fmt.Sprintf("|-%s-|-%s-|\n", strings.Repeat("-", maxNameLen), strings.Repeat("-", maxDescLen)))
availableToolsets.WriteString(fmt.Sprintf("| %-*s | %-*s | %-*s |\n", maxNameLen, "Toolset", maxDescLen, "Description", defaultHeaderLen, "Default"))
availableToolsets.WriteString(fmt.Sprintf("|-%s-|-%s-|-%s-|\n", strings.Repeat("-", maxNameLen), strings.Repeat("-", maxDescLen), strings.Repeat("-", defaultHeaderLen)))
for _, toolset := range toolsetsList {
availableToolsets.WriteString(fmt.Sprintf("| %-*s | %-*s |\n", maxNameLen, toolset.GetName(), maxDescLen, toolset.GetDescription()))
defaultIndicator := ""
if defaultToolsetsMap[toolset.GetName()] {
defaultIndicator = "✓"
}
availableToolsets.WriteString(fmt.Sprintf("| %-*s | %-*s | %-*s |\n", maxNameLen, toolset.GetName(), maxDescLen, toolset.GetDescription(), defaultHeaderLen, defaultIndicator))
}
updated := replaceBetweenMarkers(
string(readme),
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/toolsets.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type Toolset interface {
// Used to identify the toolset in configuration, logs, and command-line arguments.
// Examples: "core", "metrics", "helm"
GetName() string
// GetDescription returns a human-readable description of the toolset.
// Will be used to generate documentation and help text.
GetDescription() string
GetTools(o internalk8s.Openshift) []ServerTool
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/toolsets/kiali/toolset.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (t *Toolset) GetName() string {
}

func (t *Toolset) GetDescription() string {
return "Most common tools for managing Kiali"
return "Most common tools for managing Kiali, check the [Kiali integration documentation](https://github.com/containers/kubernetes-mcp-server/blob/main/docs/KIALI_INTEGRATION.md) for more details."
}

func (t *Toolset) GetTools(_ internalk8s.Openshift) []api.ServerTool {
Expand Down