@@ -72,44 +72,33 @@ ENV = "<environment-id>" # e.g. Default-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
7272
7373---
7474
75- ## FlowStudio for Teams : Fast-Path Diagnosis (Skip Steps 2–4)
75+ ## Optional : Fast-Path Diagnosis via Cached Store
7676
77- If you have a FlowStudio for Teams subscription, ` get_store_flow_errors `
78- returns per-run failure data including action names and remediation hints
79- in a single call — no need to walk through live API steps.
77+ > ** Requires** FlowStudio for Teams or MCP Pro+ subscription.
78+ > These are store tools from the ` flowstudio-power-automate-monitoring ` skill.
79+ > If unavailable, skip to Step 1 below — the live API workflow is
80+ > fully self-contained.
81+
82+ If store tools are available, ` get_store_flow_errors ` returns per-run
83+ failure data including action names and remediation hints in a single
84+ call — no need to walk through live API steps 2–4.
8085
8186``` python
8287# Quick failure summary
8388summary = mcp(" get_store_flow_summary" , environmentName = ENV , flowName = FLOW_ID )
84- # {"totalRuns": 100, "failRuns": 10, "failRate": 0.1,
85- # "averageDurationSeconds": 29.4, "maxDurationSeconds": 158.9,
86- # "firstFailRunRemediation": "<hint or null>"}
8789print (f " Fail rate: { summary[' failRate' ]:.0% } over { summary[' totalRuns' ]} runs " )
8890
89- # Per-run error details (requires active monitoring to be configured )
91+ # Per-run error details (requires monitor=true on the flow )
9092errors = mcp(" get_store_flow_errors" , environmentName = ENV , flowName = FLOW_ID )
9193if errors:
9294 for r in errors[:3 ]:
9395 print (r[" startTime" ], " |" , r.get(" failedActions" ), " |" , r.get(" remediationHint" ))
9496 # If errors confirms the failing action → jump to Step 6 (apply fix)
9597else :
96- # Store doesn't have run-level detail for this flow — use live tools (Steps 2–5)
98+ # No cached run data — fall through to live API workflow below
9799 pass
98100```
99101
100- For the full governance record (description, complexity, tier, connector list):
101- ``` python
102- record = mcp(" get_store_flow" , environmentName = ENV , flowName = FLOW_ID )
103- # {"displayName": "My Flow", "state": "Started",
104- # "runPeriodTotal": 100, "runPeriodFailRate": 0.1, "runPeriodFails": 10,
105- # "runPeriodDurationAverage": 29410.8, ← milliseconds
106- # "runError": "{\"code\": \"EACCES\", ...}", ← JSON string, parse it
107- # "description": "...", "tier": "Premium", "complexity": "{...}"}
108- if record.get(" runError" ):
109- last_err = json.loads(record[" runError" ])
110- print (" Last run error:" , last_err)
111- ```
112-
113102---
114103
115104## Step 1 — Locate the Flow
0 commit comments