textrawl
byJeff Green

health_check

Per-component diagnostic check across all textrawl subsystems

Quick diagnostic check across all textrawl subsystems. Returns a pass/fail result for each component with error details on failure. Use this as the first call when other tools are misbehaving — it isolates whether the problem is the database connection, a missing schema, or a specific feature.

This tool is read-only and is always registered (independent of the ENABLE_* feature flags).

Parameters

None. Call with an empty object:

{}

Components Checked

ComponentWhat it verifies
databaseA SELECT 1 round-trip succeeds; reports latencyMs
documentsThe documents table is readable; reports row count
chunksThe chunks table is readable; reports row count
memoryThe memory_entities table is readable; reports entities count
conversationsThe conversation_sessions table is readable; reports sessions count
insightsThe proactive_insights table is readable; reports count

Response

{
  "status": "healthy",
  "checks": {
    "database": { "ok": true, "latencyMs": 12 },
    "documents": { "ok": true, "count": 150 },
    "chunks": { "ok": true, "count": 1840 },
    "memory": { "ok": true, "entities": 25 },
    "conversations": { "ok": true, "sessions": 15 },
    "insights": { "ok": true, "count": 8 }
  },
  "timestamp": "2026-06-13T01:00:00.000Z"
}

Degraded example

When some components fail (for example, an optional schema was never installed), the failing checks include an error and the overall status becomes degraded:

{
  "status": "degraded",
  "checks": {
    "database": { "ok": true, "latencyMs": 14 },
    "documents": { "ok": true, "count": 150 },
    "chunks": { "ok": true, "count": 1840 },
    "memory": { "ok": false, "error": "relation \"memory_entities\" does not exist" },
    "conversations": { "ok": false, "error": "relation \"conversation_sessions\" does not exist" },
    "insights": { "ok": false, "error": "relation \"proactive_insights\" does not exist" }
  },
  "timestamp": "2026-06-13T01:00:00.000Z"
}

Output Schema

This tool returns structuredContent alongside the text response, using the same canonical keys regardless of the COMPACT_RESPONSES setting.

FieldTypeDescription
statusenumOverall status: healthy (all pass), degraded (some pass), unhealthy (none pass)
checksobjectMap of component name → check result
checks.<name>.okbooleanWhether the component check passed
checks.<name>.latencyMsinteger?Database round-trip latency (database check only)
checks.<name>.countinteger?Row count (documents, chunks, insights)
checks.<name>.entitiesinteger?Entity count (memory check)
checks.<name>.sessionsinteger?Session count (conversations check)
checks.<name>.errorstring?Error message when ok is false
timestampstringISO 8601 timestamp of the check

Status Logic

StatusCondition
healthyEvery component check passed
degradedAt least one passed and at least one failed
unhealthyEvery component check failed

Errors

ErrorCauseFix
Database not configuredMissing database connectionSet DATABASE_URL

A missing optional schema (memory, conversations, insights) does not raise an error — it surfaces as a failed component check in the response so partial outages remain visible.

  • get_stats - Detailed per-feature statistics once the system is healthy

On this page