Skip to content

Commit 2a9dddf

Browse files
committed
doc(output): add --list-output description to README.md
1 parent 0eaf288 commit 2a9dddf

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ uvx kubernetes-mcp-server@latest --help
160160
| `--sse-port` | Starts the MCP server in Server-Sent Event (SSE) mode and listens on the specified port. |
161161
| `--log-level` | Sets the logging level (values [from 0-9](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md)). Similar to [kubectl logging levels](https://kubernetes.io/docs/reference/kubectl/quick-reference/#kubectl-output-verbosity-and-debugging). |
162162
| `--kubeconfig` | Path to the Kubernetes configuration file. If not provided, it will try to resolve the configuration (in-cluster, default location, etc.). |
163+
| `--list-output` | Output format for resource list operations (one of: yaml, table) (default "table") |
163164
| `--read-only` | If set, the MCP server will run in read-only mode, meaning it will not allow any write operations (create, update, delete) on the Kubernetes cluster. This is useful for debugging or inspecting the cluster without making changes. |
164165
| `--disable-destructive` | If set, the MCP server will disable all destructive operations (delete, update, etc.) on the Kubernetes cluster. This is useful for debugging or inspecting the cluster without accidentally making changes. This option has no effect when `--read-only` is used. |
165166

pkg/kubernetes-mcp-server/cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func flagInit() {
118118
rootCmd.Flags().StringP("sse-base-url", "", "", "SSE public base URL to use when sending the endpoint message (e.g. https://example.com)")
119119
rootCmd.Flags().StringP("kubeconfig", "", "", "Path to the kubeconfig file to use for authentication")
120120
rootCmd.Flags().String("profile", "full", "MCP profile to use (one of: "+strings.Join(mcp.ProfileNames, ", ")+")")
121-
rootCmd.Flags().String("list-output", "table", "Output format for resource lists (one of: "+strings.Join(output.Names, ", ")+")")
121+
rootCmd.Flags().String("list-output", "table", "Output format for resource list operations (one of: "+strings.Join(output.Names, ", ")+")")
122122
rootCmd.Flags().Bool("read-only", false, "If true, only tools annotated with readOnlyHint=true are exposed")
123123
rootCmd.Flags().Bool("disable-destructive", false, "If true, tools annotated with destructiveHint=true are disabled")
124124
_ = viper.BindPFlags(rootCmd.Flags())

pkg/kubernetes-mcp-server/cmd/root_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestListOutput(t *testing.T) {
4848
rootCmd.ResetFlags()
4949
flagInit()
5050
out, err := captureOutput(rootCmd.Execute)
51-
if !strings.Contains(out, "Output format for resource lists (one of: yaml, table)") {
51+
if !strings.Contains(out, "Output format for resource list operations (one of: yaml, table)") {
5252
t.Fatalf("Expected all available outputs, got %s %v", out, err)
5353
}
5454
})

0 commit comments

Comments
 (0)