Skip to main content
Glama

get_alerts_history

Read-only

Retrieve current and historical Ambari cluster alerts, filtered by service, host, alert state, definition, or time range, to monitor health and investigate past incidents.

Instructions

Retrieve current alerts or alert history from Ambari cluster.

[Tool Role]: Unified tool for retrieving both current/active alert status and historical alert events from Ambari cluster

[Core Functions]:

  • Current mode: Retrieve current alerts for entire cluster, specific service, or specific host

  • History mode: Retrieve alert history for entire cluster, specific service, or specific host

  • Support filtering by alert state (CRITICAL, WARNING, OK, UNKNOWN)

  • Support filtering by definition name

  • Current mode: Support filtering by maintenance state (ON, OFF)

  • History mode: Support filtering by time range with from_timestamp/to_timestamp

  • Support different output formats (detailed, summary, compact, groupedSummary for current)

  • History mode: Provide pagination support for large datasets

  • Provide current time context for LLM natural language time calculations

[Required Usage Scenarios]:

  • Current mode: When users request current alerts, active alerts, or alert status

  • Current mode: When monitoring immediate cluster health

  • Current mode: When investigating current issues or troubleshooting active problems

  • History mode: When users request alert history, past alerts, or historical alert data

  • History mode: When monitoring alert trends or analyzing alert patterns

  • History mode: When investigating past alert incidents or troubleshooting

  • When users mention alert status, current problems, cluster health, alert events, alert timeline, or alert logs

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_alerts_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo"current" for active alerts, "history" for past events (default: "current")current
limitNoMaximum number of alert entries to return
formatNoOutput format - 'detailed', 'summary', 'compact', or 'groupedSummary' (current mode only)detailed
host_nameNoFilter by specific host name
page_sizeNoNumber of entries per page (default: 100) - history mode only
start_pageNoStarting page number (default: 0) - history mode only
cluster_nameNoName of cluster (uses default if not specified)
service_nameNoFilter by specific service name (e.g., HDFS, YARN)
state_filterNoFilter by alert state (CRITICAL, WARNING, OK, UNKNOWN)
to_timestampNoEnd timestamp in milliseconds (Unix epoch) - history mode only
from_timestampNoStart timestamp in milliseconds (Unix epoch) - history mode only
definition_nameNoFilter by alert definition name
maintenance_stateNoFilter by maintenance state (ON, OFF) - current mode only
include_time_contextNoAdd current time information for LLM natural language processing

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv3.8.2
    • addedInput schema / properties / cluster_name / description
      Added value: +"Name of cluster (uses default if not specified)"
    • addedInput schema / properties / definition_name / description
      Added value: +"Filter by alert definition name"
    • addedInput schema / properties / format / description
      Added value: +"Output format - 'detailed', 'summary', 'compact', or 'groupedSummary' (current mode only)"
    • addedInput schema / properties / from_timestamp / description
      Added value: +"Start timestamp in milliseconds (Unix epoch) - history mode only"
    • addedInput schema / properties / host_name / description
      Added value: +"Filter by specific host name"
    • addedInput schema / properties / include_time_context / description
      Added value: +"Add current time information for LLM natural language processing"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of alert entries to return"
    • addedInput schema / properties / maintenance_state / description
      Added value: +"Filter by maintenance state (ON, OFF) - current mode only"
    • addedInput schema / properties / mode / description
      Added value: +"\"current\" for active alerts, \"history\" for past events (default: \"current\")"
    • addedInput schema / properties / page_size / description
      Added value: +"Number of entries per page (default: 100) - history mode only"
    • addedInput schema / properties / service_name / description
      Added value: +"Filter by specific service name (e.g., HDFS, YARN)"
    • addedInput schema / properties / start_page / description
      Added value: +"Starting page number (default: 0) - history mode only"
    • addedInput schema / properties / state_filter / description
      Added value: +"Filter by alert state (CRITICAL, WARNING, OK, UNKNOWN)"
    • addedInput schema / properties / to_timestamp / description
      Added value: +"End timestamp in milliseconds (Unix epoch) - history mode only"
  2. Changed17 schema fields changedv3.7.5
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / cluster_name / title
      Removed value: -"Cluster Name"
    • removedInput schema / properties / definition_name / title
      Removed value: -"Definition Name"
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / properties / from_timestamp / title
      Removed value: -"From Timestamp"
    • removedInput schema / properties / host_name / title
      Removed value: -"Host Name"
    • removedInput schema / properties / include_time_context / title
      Removed value: -"Include Time Context"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / maintenance_state / title
      Removed value: -"Maintenance State"
    • removedInput schema / properties / mode / title
      Removed value: -"Mode"
    • removedInput schema / properties / page_size / title
      Removed value: -"Page Size"
    • removedInput schema / properties / service_name / title
      Removed value: -"Service Name"
    • removedInput schema / properties / start_page / title
      Removed value: -"Start Page"
    • removedInput schema / properties / state_filter / title
      Removed value: -"State Filter"
    • removedInput schema / properties / to_timestamp / title
      Removed value: -"To Timestamp"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  3. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds real behavioral context beyond that: mode-dependent filters, pagination for history, four output formats, and the include_time_context behavior. It omits practical details such as whether history mode requires a time range or what happens when no time bounds are supplied, which keeps it below a 5.

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

Conciseness2/5

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

The bracketed section headers ([Tool Role], [Core Functions], [Required Usage Scenarios]) and bullet lists pad a simple two-mode retrieval tool. There is visible redundancy: 'Current mode' is restated across seven bullets, and 'alert status / current problems / cluster health' repeat the same trigger three times, so several sentences do not earn their place.

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

Completeness4/5

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

For a 14-parameter, zero-required tool with a 100% covered schema, an output schema, and read-only annotations, the description covers the necessary ground: both modes, their filters, pagination, formats, and time context. The main remaining gap is guidance on default behavior when mode-dependent parameters are passed in the wrong mode, and the overlap with get_current_alerts.

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% and the schema descriptions already tag the mode-specific parameters ('history mode only', 'current mode only'), so the description adds little new per-parameter meaning. Its contribution is organizational — grouping which filters belong to which mode — rather than semantic, which matches the baseline 3 for full schema 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 states a concrete verb and resource ('Retrieve current alerts or alert history from Ambari cluster') and explicitly separates two operating modes (current vs. history) with their scopes (cluster, service, host). It does not, however, differentiate itself from the sibling get_current_alerts, which appears to overlap with the 'current' mode, leaving an agent to guess which to call.

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

Usage Guidelines4/5

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

The '[Required Usage Scenarios]' block gives explicit, mode-tagged triggers such as 'monitoring immediate cluster health' and 'monitoring alert trends or analyzing alert patterns', which is stronger than most definitions. It stops short of when-not-to-use guidance and never names an alternative tool for the current-alerts case, so the routing ambiguity with get_current_alerts remains unresolved.

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