Skip to main content
Glama

runner_health_rca

Read-only

Detect and diagnose self-hosted GitLab/Gitea runner health issues by flagging offline, stale, or paused runners, long-queued jobs, and tag saturation with per-flag metrics for root-cause analysis.

Instructions

[READ] Flag offline/stale/paused runners, long-queued jobs, tag saturation.

The flagship capacity RCA: pulls the runner fleet, flags each runner that is offline, stale (no contact for stale_contact_min minutes) or paused, lists jobs queued past queue_sec, and computes per-tag saturation (queued jobs vs online unpaused runners). Every flag carries its numbers. Pass 'runners' / 'queued_jobs' for pure analysis, or a target to pull the fleet live.

Args: stale_contact_min: Minutes since last contact at which a runner is stale. queue_sec: Seconds a job may wait before being flagged (default 300). saturation_ratio: Flagged queued jobs per online runner at which a tag is saturated (default 2.0). runners: Injected rows {id, description, status, paused, online, tags, contactedAt}; skips the live pull. queued_jobs: Injected rows {id, name, queuedDurationSec, createdAt, tags}. target: Server target name from config; omit for the default.

Returns dict: {runnersEvaluated, flaggedRunners, longQueuedJobs, saturatedTags, thresholds, note}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
runnersNo
queue_secNo
queued_jobsNo
saturation_ratioNo
stale_contact_minNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.5/5.0
Behavior4/5

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

The readOnlyHint annotation already covers the safety profile, and the description adds substantial context beyond it: the exact criteria for stale (no contact for stale_contact_min minutes), paused, and saturation, plus the returned threshold block and the note field. It omits error/empty-fleet behavior and auth requirements, but the analysis semantics are unusually well disclosed.

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?

Front-loads the READ tag and purpose, then organizes Args and Returns into labeled sections. It is longer than average but the length is earned by the zero-coverage schema, so almost every sentence carries information.

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?

For a 6-parameter tool with no output schema, the description documents all parameters with defaults and explains the returned dict (runnersEvaluated, flaggedRunners, longQueuedJobs, saturatedTags, thresholds, note). Nothing an agent needs to select or invoke it correctly 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?

With 0% schema description coverage, the description carries the full burden and does so well: it defines stale_contact_min, queue_sec (default 300), saturation_ratio (default 2.0), the injected row shapes for runners and queued_jobs, and target semantics. This adds real meaning (what 'stale' and 'saturated' mean) on top of bare defaults.

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?

States a specific verb (flag) and precise resources (offline/stale/paused runners, long-queued jobs, tag saturation), and frames itself as the 'flagship capacity RCA'. An agent can distinguish this diagnostic from siblings like list_runners, runner_detail, or stale_work_audit without opening any 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?

Gives clear operating modes: 'Pass runners / queued_jobs for pure analysis, or a target to pull the fleet live.' This tells the agent how to invoke in either offline-analysis or live-pull form. It does not explicitly name alternatives such as stale_work_audit, so it stops short of full when/when-not routing.

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