analyze_flow_health
Analyze recent Power Automate flow runs to measure reliability, failure rate, and duration, then rank failing actions and attribute sampled failure causes.
Instructions
Analyse a flow's recent run history: reliability, failure patterns, duration.
Answers the questions a single run cannot: is this flow flaky or broken? Which action fails most? Is it getting slower? The portal's analytics page shows counts but will not tell you WHICH action is responsible or group failures by cause.
last_n runs are analysed for statistics. Because action-level detail costs one
request per run, only sample_failures of the failed runs are opened to attribute
causes. The response says how many were sampled - do not read the tally as exhaustive.
Returns: total / succeeded / failed / cancelled / running failure_rate 0.0 to 1.0 over completed runs only duration_seconds {mean, p95, max} across successful runs failing_actions [{action, count, sample_error}] ranked, from the sampled failures verdict plain-language read of the numbers
A single action accounting for nearly all failures means a targeted fix. Failures spread across many actions usually means the trigger data or a connection, not the logic.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"flow_id": "<flow_id>"
},
"name": "analyze_flow_health"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| last_n | No | ||
| flow_id | Yes | ||
| sample_failures | No |