Skip to main content
Glama

get_alerts_history

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

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.8/5.0
Behavior4/5

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

With no annotations, the description does meaningful work: it discloses that pagination and time-range filtering exist only in history mode, that format/maintenance_state are current-mode only, and that time context can be injected for LLM calculations. It does not explicitly state the read-only/no-side-effect profile or error behavior, which keeps it from a 5 given the absence of annotations.

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

Conciseness3/5

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

Purpose is front-loaded in the first sentence, but the bracketed section headers and seven overlapping scenario bullets ('monitoring alert trends', 'analyzing alert patterns', 'investigating past alert incidents') pad length without adding discriminating information.

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 multi-mode tool with no annotations, the description covers mode selection, filtering capabilities, and pagination, and an output schema handles return values. The remaining gap is sibling differentiation against get_current_alerts, which an agent needs in order to pick the right tool.

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 100%, so the baseline is 3. The description's mode-qualification of parameters (history-only timestamp/pagination, current-only maintenance state) largely repeats what the parameter descriptions already say, adding little beyond the schema.

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 opening sentence states a specific verb and resource ('Retrieve current alerts or alert history from Ambari cluster'), and the mode split makes the scope concrete. However, a sibling named get_current_alerts overlaps directly with the 'current' mode, and the description never acknowledges or distinguishes itself from it.

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 triggers for each mode (current for active problems, history for trends/past incidents), which is well above implied usage. It stops short of a 5 because it never says when NOT to use this tool or names alternatives, notably the overlapping get_current_alerts sibling.

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