Skip to main content
Glama

Delimit Heartbeat Check

delimit_heartbeat_check

Checks scheduled service heartbeats to identify stale or failed daemons before they cause silent incidents.

Instructions

Walk the heartbeat directory and report which scheduled services are stale (LED-1412).

When to use: as part of the session-start ritual to surface silent daemon staleness before it becomes a customer-visible incident. The 2026-05-15 incident — delimit-reddit-proxy.service inactive for 13 days, all reddit scans 429-failing silently, founder noticing only via "3 day old posts" — is the failure mode this prevents. Each scheduled task writes ~/.delimit/heartbeats/<service>.json after every run; this tool walks the dir and classifies each service. When NOT to use: for one-off liveness checks (just read the file yourself) or for full-host metrics (delimit_obs_status). Phase 2 will add an external deadman ping for full-host outages — heartbeats here are local-only.

Sibling contrast: delimit_obs_status reports composed runtime observability metrics; this reports per-service liveness based on last_run timestamps written by each daemon. delimit_gov_health reports the kernel layer.

Side effects: read-only on the heartbeat directory. No network, no write, no ledger, no notification.

Classification (most-severe-first):

  • parse_error: heartbeat file unreadable

  • failed: status='failed' in the record

  • stale: last_run older than service-specific threshold

  • degraded: status='degraded' in the record

  • never_seen: configured service has no heartbeat file yet

  • unknown_age: heartbeat exists but timestamp won't parse

  • ok: status='ok' AND last_run within threshold

Per-service thresholds default to sensible values (reddit/social-loop 2h, inbox 30min, daily timers 36h). Override via <dir>/_thresholds.json — JSON map of {service_name: seconds}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
heartbeat_dirNoOverride the heartbeat directory. Default: $DELIMIT_HEARTBEAT_DIR env var or ~/.delimit/heartbeats/.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.7.9

TDQS

A3.8/5.0
Behavior1/5

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

Annotation Contradiction: the description states 'Side effects: read-only on the heartbeat directory. No network, no write, no ledger, no notification,' but the annotations declare readOnlyHint: false. This directly contradicts the structured metadata and creates conflicting signals about whether the tool may mutate state.

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

Conciseness5/5

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

The description is long but every section earns its place: purpose, usage guidance, sibling contrast, side effects, classification semantics, and thresholds. It is front-loaded with a clear one-sentence summary and uses structured headings for scannability.

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?

An output schema exists, so return values need no prose description. The description covers classifications, thresholds, override mechanism, local-only behavior, and alternatives. It would be fully complete were it not for the readOnlyHint contradiction, which introduces avoidable uncertainty about side effects.

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 single optional parameter heartbeat_dir is already well documented with its default and environment variable fallback. The description adds useful context about heartbeat files and thresholds but does not need to compensate for schema gaps, so the baseline 3 applies.

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 sentence states a specific verb, resource, and outcome: 'Walk the heartbeat directory and report which scheduled services are stale.' The sibling contrast explicitly distinguishes this tool from delimit_obs_status and delimit_gov_health, so an agent can tell them apart.

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

Usage Guidelines5/5

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

The description gives explicit 'When to use' and 'When NOT to use' guidance, including concrete alternatives like delimit_obs_status and direct file reads for one-off liveness checks. This leaves no ambiguity about selection.

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

Deploy Server

Other Tools