Assess a flow's reliability
cs_analyze_flow_healthAnalyze cloud flow reliability across recent runs, revealing failure rate, duration spread, and which actions fail. Use before cs_explain_flow_run for intermittent failures.
Instructions
How reliable a cloud flow is across its recent runs: failure rate, duration spread (median and 90th percentile), and which actions the failures concentrate on. The verdict distinguishes one broken step from failures spread across many actions, which points at a connection, throttling or an unreliable downstream system instead. Read-only. Use it before cs_explain_flow_run when the complaint is 'it fails sometimes' rather than 'it failed just now'. Uses the Power Automate service (cs_login scope 'flow'). Unverified against a live tenant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lastN | No | Runs to examine; default 50 | |
| flowId | Yes | Flow id (cs_list_flows) | |
| clientId | No | Entra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id. | |
| tenantId | No | Entra tenant id. Defaults to the workspace sync metadata, then CPS_TENANT_ID. | |
| workspace | No | Path to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory. | |
| environmentId | No | Power Platform environment id (GUID). Defaults to workspace sync metadata or CPS_ENVIRONMENT_ID. | |
| sampleFailures | No | Failed runs to open for action-level attribution; default 5 |