mirror of
https://github.com/containers/kubernetes-mcp-server.git
synced 2025-10-23 01:22:57 +03:00
doc(output): add --list-output description to README.md
This commit is contained in:
@@ -160,6 +160,7 @@ uvx kubernetes-mcp-server@latest --help
|
||||
| `--sse-port` | Starts the MCP server in Server-Sent Event (SSE) mode and listens on the specified port. |
|
||||
| `--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). |
|
||||
| `--kubeconfig` | Path to the Kubernetes configuration file. If not provided, it will try to resolve the configuration (in-cluster, default location, etc.). |
|
||||
| `--list-output` | Output format for resource list operations (one of: yaml, table) (default "table") |
|
||||
| `--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. |
|
||||
| `--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. |
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ func flagInit() {
|
||||
rootCmd.Flags().StringP("sse-base-url", "", "", "SSE public base URL to use when sending the endpoint message (e.g. https://example.com)")
|
||||
rootCmd.Flags().StringP("kubeconfig", "", "", "Path to the kubeconfig file to use for authentication")
|
||||
rootCmd.Flags().String("profile", "full", "MCP profile to use (one of: "+strings.Join(mcp.ProfileNames, ", ")+")")
|
||||
rootCmd.Flags().String("list-output", "table", "Output format for resource lists (one of: "+strings.Join(output.Names, ", ")+")")
|
||||
rootCmd.Flags().String("list-output", "table", "Output format for resource list operations (one of: "+strings.Join(output.Names, ", ")+")")
|
||||
rootCmd.Flags().Bool("read-only", false, "If true, only tools annotated with readOnlyHint=true are exposed")
|
||||
rootCmd.Flags().Bool("disable-destructive", false, "If true, tools annotated with destructiveHint=true are disabled")
|
||||
_ = viper.BindPFlags(rootCmd.Flags())
|
||||
|
||||
@@ -48,7 +48,7 @@ func TestListOutput(t *testing.T) {
|
||||
rootCmd.ResetFlags()
|
||||
flagInit()
|
||||
out, err := captureOutput(rootCmd.Execute)
|
||||
if !strings.Contains(out, "Output format for resource lists (one of: yaml, table)") {
|
||||
if !strings.Contains(out, "Output format for resource list operations (one of: yaml, table)") {
|
||||
t.Fatalf("Expected all available outputs, got %s %v", out, err)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user