Skip to main content
Glama

Explain a failed flow run

cs_explain_flow_run

Explains 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

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesRun id (cs_list_flow_runs)
flowIdYesFlow id (cs_list_flows)
clientIdNoEntra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id.
tenantIdNoEntra tenant id. Defaults to the workspace sync metadata, then CPS_TENANT_ID.
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
environmentIdNoPower Platform environment id (GUID). Defaults to workspace sync metadata or CPS_ENVIRONMENT_ID.
includeInputsNoFetch each failed action's inputs as well; default true
upstreamCountNoSucceeded actions to include with their outputs, ending at the first failure; default 3

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.6

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses deep internals: real error messages are resolved from the failing action's outputs because connector failures carry no error, failures are classified into three categories, and inputs plus upstream outputs are returned. It also honestly states 'Unverified against a live tenant'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tightly packed sentences front-load the purpose, then the mechanism, then the prerequisite and caveat. Every clause carries actionable information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Rich for a tool with no output schema and no annotations: it describes the diagnostic content, the classification taxonomy, the prerequisite sibling, the auth scope, and a live-tenant caveat. Minor gap: it does not detail the exact error-category semantics or pagination/limits, but the content subscription is thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema documents all 8 parameters including defaults. The description mentions the returned inputs/upstream outputs but adds no syntax or format beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource with a clear scope qualifier ('Why one run of a cloud flow failed, in terms of the action that broke'). Distinguishes itself from siblings like cs_get_flow_run and cs_compare_flow_runs by targeting root-cause explanation of a single failure.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs 'Start here when cs_list_flow_runs shows a failure' and names the sibling tool that surfaces the failure. No inference is needed about when this tool applies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools