Skip to main content
Glama
dimonb

Uptrace MCP Server

by dimonb

uptrace_get_alert

Retrieve detailed information about a specific alert incident by its ID to analyze and respond to monitoring events in the Uptrace observability platform.

Instructions

Get details of a specific alert incident by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alert_idYesID of the alert incident to retrieve

Implementation Reference

  • The handler logic for the 'uptrace_get_alert' tool, which retrieves alert details using the Uptrace client and formats the output.
    elif name == "uptrace_get_alert":
        alert_id = arguments.get("alert_id")
        if not alert_id:
            return [TextContent(type="text", text="Error: alert_id is required")]
    
        logger.info(f"Fetching alert: {alert_id}")
        alert = client.get_alert(alert_id)
    
        import json
    
        lines = [
            f"# Alert: {alert.name}",
            f"- **ID**: {alert.id}",
            f"- **Type**: {alert.type}",
            f"- **Status**: {alert.status or 'Unknown'}",
            f"- **Created At**: {datetime.fromtimestamp(alert.created_at/1000, tz=timezone.utc).isoformat()}",
            f"- **Monitor ID**: {alert.monitor_id}",
            "",
            "## Attributes",
            f"```json\n{json.dumps(alert.attrs, indent=2)}\n```",
            "",
        ]
    
        if alert.events:
            lines.append("## Events")
            for event in alert.events:
                ts = datetime.fromtimestamp(
                    event.get("createdAt", 0) / 1000, tz=timezone.utc
                ).isoformat()
                name = event.get("name", "Unknown")
                lines.append(f"- **{ts}**: {name} ({event.get('status', '')})")
  • The registration definition for 'uptrace_get_alert' within the MCP server's tools list, including its schema.
    Tool(
        name="uptrace_get_alert",
        description="Get details of a specific alert incident by ID.",
        inputSchema={
            "type": "object",
            "properties": {
                "alert_id": {
                    "type": "string",
                    "description": "ID of the alert incident to retrieve",
                },
            },
            "required": ["alert_id"],
        },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states 'Get details' without describing error behavior (e.g., what happens if the ID doesn't exist), authentication requirements, or what specific fields/details are returned in the response.

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?

Single sentence, front-loaded with the verb, zero wasted words. Appropriate length for the tool's simplicity.

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?

Adequate for a single-parameter retrieval tool, but the lack of output schema means the description should ideally characterize the returned alert details (severity, status, monitor reference, etc.) to compensate, which it does not.

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 coverage is 100% ('ID of the alert incident to retrieve'), so the schema adequately documents the parameter. The description adds 'by ID' which aligns with the schema but provides no additional format details, constraints, or examples beyond the schema itself.

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?

Clear verb ('Get') and resource ('alert incident'), with specific scope ('by ID'). However, it doesn't explicitly differentiate from sibling 'uptrace_get_monitor' (alerts vs monitors are distinct resources in observability, but this isn't clarified), preventing a 5.

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 on when to use this tool versus 'uptrace_get_monitor' or the various search/list siblings. The description states what the tool does but not when to choose it over alternatives that also retrieve observability data.

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/dimonb/uptrace-mcp'

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