Explain a failed flow run
cs_explain_flow_runExplains why a Power Automate flow run failed by identifying broken action, resolving the error, classifying as connector, expression, or timeout, and returning inputs and upstream outputs. Read-only.
Instructions
Why one run of a cloud flow failed, in terms of the action that broke and what it was given. For each failed action it resolves the real error message - a failed connector action carries no error of its own, so the message is fetched from the action's outputs - classifies the failure as a connector, expression or timeout problem, and returns the inputs it was called with plus the outputs of the actions that ran just before it. Read-only. Start here when cs_list_flow_runs shows a failure. Uses the Power Automate service (cs_login scope 'flow'). Unverified against a live tenant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | Run id (cs_list_flow_runs) | |
| 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. | |
| includeInputs | No | Fetch each failed action's inputs as well; default true | |
| upstreamCount | No | Succeeded actions to include with their outputs, ending at the first failure; default 3 |