Skip to main content
Glama
AIops-tools

io.github.AIops-tools/olvm-aiops

Official

host_health_rca

Read-only

Ranks KVM host health issues worst first by combining status, flags, and recent events into actionable findings with signal, cause, action, and rank.

Instructions

[READ] What needs attention on KVM hosts, ranked worst first, in one call.

Combines host status and status detail, reinstall/update flags and recent warning-or-worse events that name a host. Each finding has signal (what was measured), cause, action and rank. Hosts that the engine is installing or rebooting are reported as in progress, not failed; alert 9000 (power management not verifiable) is informational on hosts without fencing hardware. A failed guest-agent call (event 10802, a command starting with VmLogon or VmLogoff whose message names the guest agent) is a problem of a guest, not of the host that ran the call: it is reported low and carries vmCandidates, the VMs the engine reports on that host. The same command failing for another reason stays a host finding. The event names no VM, so present those as candidates to check, never as the affected VM; if that envelope has an error, or scanTruncated is true, say the candidate list is incomplete. Every event-10802 finding reports one vdsm command rather than the host's own state, so its cause names the command; do not restate it as "this host is failing" unless the host's status, external status or flags say so. It also carries relatedVmEvents: the VM-level failures the engine logged within windowSeconds on this host, which is where the operation's own failure is recorded (vm_health_rca reports that half). They are paired on time alone — say "possibly the same operation", never that the host finding is about a named VM; an empty list means none was logged, not that none was looked for. Report findings in rank order and quote their signal.

Args: events_limit: Recent warning-or-worse events to correlate, 1-1000 (default 200). events_window_hours: Ignore events older than this many hours, 1-720 (default 24); older ones are counted in eventsOutsideWindow. target: Engine target name from config; omit to use the default.

Input Schema

NameRequiredDescriptionDefault
targetNo
events_limitNo
events_window_hoursNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With only readOnlyHint=true in annotations, the description adds substantial behavioral context: in-progress installs/reboots are reported as in-progress not failed, alert 9000 is informational on hosts without fencing, event 10802 is scoped to the guest not the host, relatedVmEvents are paired on time alone, and an empty list means none was logged. This is exactly the kind of semantics annotations cannot convey.

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?

It is front-loaded with the purpose and every sentence carries interpretation content, but the middle is a dense wall of edge-case prose that could be broken into clearer structure. Length is largely justified by the absence of an output schema, though it borders on over-specified.

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

Completeness5/5

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

There is no output schema, yet the description explains the returned finding fields (signal, cause, action, rank), the auxiliary fields (vmCandidates, relatedVmEvents, eventsOutsideWindow, scanTruncated), and how to interpret each. Nothing an agent needs to invoke or read results is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the burden and does: it documents events_limit (range 1-1000, default 200), events_window_hours (range 1-720, default 24, older events counted in eventsOutsideWindow), and target (engine target name, omit for default). Ranges and the out-of-window side effect are meaningfully beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first line states a specific resource and scope: 'What needs attention on KVM hosts, ranked worst first, in one call.' It also distinguishes itself from the sibling vm_health_rca, which is named as reporting the VM half. An agent can tell what this tool is and is not without opening the schema.

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 description gives clear context for when the tool applies (host-level health triage) and routes the VM half of an operation to vm_health_rca by name. However, it never explicitly states when to prefer this over siblings like host_get or engine_health_rca, so the selection guidance is contextual rather than an explicit when/when-not rule.

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