Check segment health
check_segment_healthInspect MPP segment health by reading gp_segment_configuration to report per-segment status, sync mode, and role drift, plus unhealthy and out-of-sync counts for failover detection.
Instructions
Walk gp_segment_configuration and surface MPP segment posture. Returns per-segment status ('u' = up), mode ('s' = sync / 'n' = not-in-sync / 'c' = changetracking), and role vs preferred_role to detect post-failover state. Top-level unhealthy_count + out_of_sync_count let agents branch without walking the segments array. Read-only. On vanilla PG returns available=false.
Example: check_segment_health()
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_segment_health"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| segments | Yes | ||
| available | Yes | ||
| healthy_count | Yes | ||
| total_segments | Yes | ||
| unhealthy_count | Yes | ||
| out_of_sync_count | Yes |