Skip to main content
Glama

ako_config_diff

Read-onlyIdempotent

Display pending Helm value changes not yet applied. Review differences before upgrading configuration.

Instructions

[READ] Show pending Helm value changes that haven't been applied yet.

Use before ako_config_upgrade to review what will change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler: runs `helm diff upgrade ako avi/ako -n avi-system` to show pending Helm changes. Returns output via rich console which is captured by the MCP server.
    def diff_ako_config(namespace: str = "avi-system") -> None:
        """Show pending Helm changes via helm diff."""
        result = subprocess.run(
            ["helm", "diff", "upgrade", "ako", "avi/ako", "-n", namespace],
            capture_output=True,
            text=True,
            timeout=120,
        )
        if result.returncode != 0:
            console.print(
                "[yellow]helm-diff plugin may not be installed. "
                "Install: helm plugin install https://github.com/databus23/helm-diff[/yellow]"
            )
            console.print(f"[red]{result.stderr.strip()}[/red]")
            raise SystemExit(1)
    
        if not result.stdout.strip():
            console.print("[green]No pending changes.[/green]")
        else:
            console.print("\n[bold]Pending Changes[/bold]\n")
            console.print(result.stdout)
  • MCP tool definition: decorated with @mcp.tool and @vmware_tool, annotated as read-only, low-risk. Calls diff_ako_config() and captures output.
    @mcp.tool(annotations={"readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": True})
    @vmware_tool(risk_level="low")
    def ako_config_diff() -> str:
        """[READ] Show pending Helm value changes that haven't been applied yet.
    
        Use before ako_config_upgrade to review what will change.
        """
        from vmware_avi.ops.ako_config import diff_ako_config
        return _capture_output(diff_ako_config)
  • Registration via @mcp.tool decorator with annotations and @vmware_tool. The function name 'ako_config_diff' becomes the tool name in MCP.
    @mcp.tool(annotations={"readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": True})
    @vmware_tool(risk_level="low")
    def ako_config_diff() -> str:
        """[READ] Show pending Helm value changes that haven't been applied yet.
    
        Use before ako_config_upgrade to review what will change.
        """
        from vmware_avi.ops.ako_config import diff_ako_config
        return _capture_output(diff_ako_config)
  • Helper function _capture_output() that runs a function and captures its Rich console output as plain text for MCP response.
    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()
  • CLI command registration for 'ako config-diff' typer sub-command, also calling diff_ako_config().
    @ako_app.command("config-diff")
    def ako_config_diff_cmd() -> None:
        """Show pending Helm changes (diff)."""
        from vmware_avi.ops.ako_config import diff_ako_config
    
        diff_ako_config()
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds that it shows pending, unapplied changes, confirming it is a read-only review. No additional side effects needed beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with purpose. No redundant information. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters, rich annotations, and existence of output schema, the description is fully complete for safe invocation. It complements the sibling upgrade tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters defined, so baseline is 4. The description does not need to add parameter information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Show' and resource 'pending Helm value changes' with a [READ] prefix. It clearly distinguishes from sibling ako_config_upgrade by stating what it reviews before applying changes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Use before ako_config_upgrade to review what will change.' This gives clear when-to-use and names the alternative tool for applying changes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zw008/VMware-AVI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server