ako_config_show
Display current AKO Helm values.yaml configuration, including controller IP, cloud name, network settings, and feature flags.
Instructions
[READ] Show current AKO Helm values.yaml configuration — controller IP, cloud name, network settings, and feature flags.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- vmware_avi/ops/ako_config.py:12-25 (handler)Core handler: runs 'helm get values ako -n avi-system -o yaml' to fetch current AKO Helm values.yaml configuration.
def show_ako_config(namespace: str = "avi-system") -> None: """Show current AKO Helm values.""" result = subprocess.run( ["helm", "get", "values", "ako", "-n", namespace, "-o", "yaml"], capture_output=True, text=True, timeout=120, ) if result.returncode != 0: console.print(f"[red]Failed to get AKO values: {result.stderr.strip()}[/red]") raise SystemExit(1) console.print("\n[bold]AKO Helm Values[/bold]\n") console.print(result.stdout) - mcp_server/server.py:327-330 (handler)MCP tool def: ako_config_show() decorated with @mcp.tool and @vmware_tool, imports show_ako_config and captures its output.
def ako_config_show() -> str: """[READ] Show current AKO Helm values.yaml configuration — controller IP, cloud name, network settings, and feature flags.""" from vmware_avi.ops.ako_config import show_ako_config return _capture_output(show_ako_config) - mcp_server/server.py:325-330 (registration)Registration: decorated with @mcp.tool and @vmware_tool(risk_level='low') registering the tool named 'ako_config_show' with FastMCP.
@mcp.tool(annotations={"readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": True}) @vmware_tool(risk_level="low") def ako_config_show() -> str: """[READ] Show current AKO Helm values.yaml configuration — controller IP, cloud name, network settings, and feature flags.""" from vmware_avi.ops.ako_config import show_ako_config return _capture_output(show_ako_config) - mcp_server/server.py:327-330 (schema)Schema: annotations={'readOnlyHint': True, 'destructiveHint': False, 'idempotentHint': True, 'openWorldHint': True} — read-only, no params, returns str.
def ako_config_show() -> str: """[READ] Show current AKO Helm values.yaml configuration — controller IP, cloud name, network settings, and feature flags.""" from vmware_avi.ops.ako_config import show_ako_config return _capture_output(show_ako_config) - mcp_server/server.py:24-48 (helper)Helper: _capture_output() runs a function and captures Rich console output as plain text, used to wrap show_ako_config.
def _capture_output(func, *args, **kwargs) -> str: """Run a function and capture its Rich console output as plain text.""" import importlib # noqa: F401 — used via sys.modules lookup import sys buf = StringIO() from rich.console import Console capture_console = Console(file=buf, force_terminal=False, width=120) mod_name = func.__module__ mod = sys.modules.get(mod_name) original_console = getattr(mod, "console", None) if mod else None if mod and original_console is not None: mod.console = capture_console try: func(*args, **kwargs) except SystemExit: pass finally: if mod and original_console is not None: mod.console = original_console return buf.getvalue()