Skip to main content
Glama
AIops-tools

container-host-aiops

by AIops-tools

restart_loop_rca

Inspects containers for crash-looping by restart count and exit code, then maps each to a cause and recommended action with log tails.

Instructions

[READ] Find crash-looping containers and map each to a cause + action.

The flagship restart RCA: inspects containers for restart count + exit code, flags the crash-looping ones (restartCount >= threshold, or restarting/dead, or a non-zero exit), attaches a likely cause + recommended action from the exit code (137 OOM/SIGKILL, 143 SIGTERM, 139 segfault, 127 bad entrypoint, …), and a tail of logs. Every ranking carries its numbers. Pass 'containers' for pure analysis, or a target to pull live.

Args: restart_threshold: Restart count at/above which a container is looping (default 3). containers: Injected rows {id, name, state, restartCount, exitCode, oomKilled, error}; skips live collection. logs_by_id: Optional {containerId: [logLine, ...]} log tails to attach. target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
containersNo
logs_by_idNo
restart_thresholdNo
Behavior4/5

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

With no annotations, the description carries full burden. It explicitly states it is a read operation (starts with [READ]), describes the inspection process, and notes no destructive effects. It covers exit code interpretation and log attachment.

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?

The description is front-loaded with a summary sentence, followed by detailed behavior and parameter list. It is well-structured but slightly verbose in the middle paragraph; still efficient given the complexity.

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?

The description explains input parameters and behavior sufficiently. It mentions output includes ranking numbers and cause/action, but does not detail the exact output structure. Given no output schema, this is adequate for an RCA tool.

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%, but the description includes an 'Args' section that explains all four parameters: restart_threshold (default), containers (injected rows), logs_by_id (optional logs), and target (target name). This fully compensates for the missing schema descriptions.

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 description clearly states the tool's verb 'Find' and resource 'crash-looping containers', and explains its RCA purpose. It distinguishes from sibling tools like list_containers and inspect_container by focusing on root cause analysis of restart loops.

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 provides guidance on when to use (for crash-loop analysis) and how to invoke (pass containers or target). It mentions the threshold parameter but does not explicitly state when not to use or alternatives.

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/AIops-tools/Container-Host-AIops'

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