Skip to main content
Glama
driosalido
by driosalido

list_clusters

Retrieve all available Kubernetes clusters from the Karma Alert dashboard to monitor and analyze alerts across your infrastructure.

Instructions

List all available Kubernetes clusters in Karma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'list_clusters' tool handler implementation. It fetches alert data, extracts cluster information, and returns a formatted string.
    async def list_clusters() -> str:
        """List all available Kubernetes clusters in Karma"""
        data, error = await fetch_karma_alerts()
        if error:
            return error
    
        clusters, cluster_alert_counts = extract_cluster_info(data)
    
        # Format output
        result = "🏢 Available Kubernetes Clusters\n"
        result += "=" * 50 + "\n\n"
    
        for cluster_name, info in sorted(clusters.items()):
            alert_count = cluster_alert_counts.get(cluster_name, 0)
            status_icon = "✅" if "healthy" in info["status"] else "❌"
    
            result += f"📋 {cluster_name}\n"
            result += f"   Instance: {info['instance_name']}\n"
            result += f"   Status: {status_icon} {info['status']}\n"
            result += f"   Alertmanager: {info['version']}\n"
            result += f"   Active Alerts: {alert_count}\n"
            result += f"   URI: {info['uri']}\n\n"
    
        result += "📊 Summary:\n"
        result += f"   Total Clusters: {len(clusters)}\n"
        result += f"   Total Alert Instances: {sum(cluster_alert_counts.values())}"
    
        return result
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states what the tool does but doesn't disclose important traits like whether this is a read-only operation, if it requires authentication, how results are formatted (though output schema exists), or if there are rate limits. The description doesn't contradict annotations (since none exist), but it fails to compensate for their absence.

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?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff. It's appropriately sized for a zero-parameter list operation and is front-loaded with the essential information.

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

Completeness3/5

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

For a simple list operation with zero parameters and an output schema, the description is minimally adequate. However, given the lack of annotations and the presence of sibling tools in the same domain (Karma/alert management), it could better address context like how clusters relate to alerts or what 'available' means in this context. The output schema reduces the need to describe return values.

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?

The tool has zero parameters, and schema description coverage is 100% (though trivial since there are no parameters). The description appropriately doesn't waste space discussing nonexistent parameters, and with no parameters to document, it meets the baseline expectation for parameter semantics.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('all available Kubernetes clusters in Karma'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'check_karma' or 'list_alerts_by_cluster', but the resource specificity (clusters vs. alerts/silences) provides implicit distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or how it differs from sibling tools like 'check_karma' (which might provide cluster health status) or 'list_alerts_by_cluster' (which focuses on alerts rather than clusters).

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/driosalido/mcp-karma'

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