Skip to main content
Glama
driosalido
by driosalido

list_alerts

View all active alerts in the Karma Alert dashboard to monitor Kubernetes alert status and identify issues requiring attention.

Instructions

List all active alerts in Karma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `list_alerts` tool handler fetches alert data and formats it into a summary string.
    async def list_alerts() -> str:
        """List all active alerts in Karma"""
        data, error = await fetch_karma_alerts()
        if error:
            return error
    
        # Process alerts using utility functions
        total_alerts = 0
        alert_text = ""
    
        grids = data.get("grids", [])
        for grid in grids:
            for group in grid.get("alertGroups", []):
                alerts = group.get("alerts", [])
                total_alerts += len(alerts)
    
                for alert in alerts[:10]:  # Show max 10 alerts per group
                    metadata = extract_alert_metadata(group, alert)
    
                    alert_text += f"• {metadata['alertname']}\n"
                    alert_text += f"  Severity: {metadata['severity']}\n"
                    alert_text += f"  State: {metadata['state']}\n"
                    alert_text += f"  Namespace: {metadata['namespace']}\n\n"
    
        if total_alerts == 0:
            return "No active alerts"
    
        alert_text = f"Found {total_alerts} alerts:\n\n" + alert_text
        return alert_text
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but doesn't cover aspects like whether this is a read-only operation, potential rate limits, authentication needs, or what 'active' means operationally. This leaves significant gaps for an agent to understand tool behavior.

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 wasted words. It is front-loaded and appropriately sized for a simple tool with no parameters.

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 has no parameters, 100% schema coverage, and an output schema exists, the description is minimally adequate. However, it lacks behavioral context (e.g., what 'active' entails, response format hints) and differentiation from siblings, which could help an agent use it correctly in context.

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 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a high baseline score for not adding unnecessary information.

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 active alerts in Karma'), making the purpose specific and understandable. However, it doesn't differentiate from siblings like 'list_active_alerts' or 'get_alerts_by_state', which appear to serve similar functions, preventing a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives such as 'list_active_alerts' or 'get_alerts_by_state'. The description lacks context about prerequisites, exclusions, or comparisons to sibling tools, leaving usage unclear.

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