Skip to main content
Glama
driosalido
by driosalido

get_alert_details

Retrieve comprehensive information about a specific Kubernetes alert from the Karma Alert dashboard to analyze details and monitor status.

Instructions

Get detailed information about a specific alert

Args: alert_name: Name of the alert to get details for

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alert_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_alert_details tool handler function implementation, which fetches all alerts from Karma API and filters for the specified alert_name, then formats the details of matching alert instances.
    async def get_alert_details(alert_name: str) -> str:
        """Get detailed information about a specific alert
    
        Args:
            alert_name: Name of the alert to get details for
        """
        data, error = await fetch_karma_alerts()
        if error:
            return error
    
        # Find matching alerts
        matching_alerts = []
        grids = data.get("grids", [])
    
        for grid in grids:
            for group in grid.get("alertGroups", []):
                alertname = extract_label_value(group.get("labels", []), "alertname")
    
                if alertname.lower() == alert_name.lower():
                    for alert in group.get("alerts", []):
                        matching_alerts.append({"alert": alert, "group": group})
    
        if not matching_alerts:
            return f"No alert found with name: {alert_name}"
    
        # Format alert details
        details = f"🔍 Found {len(matching_alerts)} instance(s) of {alert_name}:\n\n"
    
        for i, item in enumerate(matching_alerts, 1):
            alert = item["alert"]
            group = item["group"]
    
            metadata = extract_alert_metadata(group, alert)
            annotations = extract_annotations(alert)
    
            details += f"📋 Instance {i}:\n"
            details += f"  State: {metadata['state']}\n"
            details += f"  Severity: {metadata['severity']}\n"
            details += f"  Namespace: {metadata['namespace']}\n"
            details += f"  Cluster: {metadata['cluster']}\n"
    
            # Add instance if available
            instance = extract_label_value(alert.get("labels", []), "instance")
            if instance != "unknown":
                details += f"  Instance: {instance}\n"
    
            # Add annotations
            if "description" in annotations:
                description = annotations["description"]
                if len(description) > 200:
                    description = description[:200] + "..."
                details += f"  Description: {description}\n"
    
            if "summary" in annotations:
                details += f"  Summary: {annotations['summary']}\n"
    
            details += "\n"
    
        return details
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool retrieves information, implying a read-only operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'detailed information' entails. The presence of an output schema helps, but the description lacks context on data freshness or access permissions.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded with the core purpose in the first sentence. The Args section is structured but could be more integrated. No wasted sentences, though it could be slightly more informative without losing conciseness.

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?

Given the tool's low complexity (1 parameter) and the presence of an output schema, the description is somewhat complete but lacks depth. It covers the basic purpose but misses usage guidelines and behavioral context, which are important for a tool in a crowded sibling set. The output schema reduces the need to explain return values, but overall completeness is minimal.

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

Parameters3/5

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

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds minimal semantics by specifying 'alert_name' as the 'Name of the alert to get details for', which clarifies the parameter's purpose. However, it doesn't explain format constraints, examples, or how to obtain valid alert names, leaving gaps given the low coverage.

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 tool's purpose with a specific verb ('Get') and resource ('detailed information about a specific alert'). It distinguishes from siblings like 'list_alerts' or 'get_alerts_summary' by focusing on a single alert's details. However, it doesn't explicitly contrast with 'get_alert_details_multi_cluster', which appears to be a very similar sibling.

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. With many sibling tools for alert management (e.g., 'list_alerts', 'get_alerts_by_state', 'search_alerts_by_container'), there's no indication of prerequisites, context, or distinctions. The agent must infer usage from the name alone.

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