diagnose_dataflow
Diagnose no-data breaks across endpoint hops by probing connectivity, reads, freshness, and variance to separate connection failures, stale values, and flatlines, with a recommended fix.
Instructions
[READ][risk=low] Localize a 'no data' break across an endpoint's reachable hops.
Probes connect → read(ref) → freshness → variance and returns a verdict with
per-hop detail and a recommended action. The #1 OT triage: distinguishes
"cannot connect" (network/PLC down) from "comms OK but value stale"
(upstream/field/source) from "good status but flatline" (sensor stuck).
Args:
endpoint: Endpoint name from config (any protocol).
ref: Tag/node/address/device to read (OPC-UA node id, Modbus address,
S7 address string, MELSEC device). Omit to test connectivity only.
freshness_threshold_s: Max value-age (seconds) before 'stale' (default 60).
series: Optional injected samples (scalars or {value,timestamp}) for
flatline/variance reasoning when a live historian is out of reach.
flatline_eps: Spread at/below which a series counts as flatline.
Returns dict: {verdict ('cannot_connect'|'comms_ok_value_unreadable'|
'comms_ok_description_mismatch'|'comms_ok_bad_quality'|
'comms_ok_value_stale'|'comms_ok_flatline'|'no_per_ref_read_in_this_build'|
'no_connect_probe_in_this_build'|'healthy'), diagnosis,
recommended_action, hops:[{hop, ok, detail}]}.
'comms_ok_description_mismatch' means the sensor profile does not fit the
device (wrong sensor fitted, other process-data layout, no profile): fix
the configuration, not the field.
Example: diagnose_dataflow(endpoint="line1", ref="ns=2;i=5", freshness_threshold_s=30).
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": "diagnose_dataflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| series | No | ||
| endpoint | No | ||
| flatline_eps | No | ||
| freshness_threshold_s | No |