[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MJW08376EYVTMAMYJH6FAV":3,"skill-same:01M6MJW08376EYVTMAMYJH6FAV":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6MJW08376EYVTMAMYJH6FAV","power-automate-mcp",null,"Foundation skill for Power Automate via FlowStudio MCP — auth setup, the reusable MCP helper (Python + Node.js), tool discovery via `list_skills` \u002F `tool_search`, and oversized-response handling. Load this skill first when connecting an agent to Power Automate. For specialized workflows, load `power-automate-build`, `power-automate-debug`, `power-automate-monitoring` (Pro+), or `power-automate-governance` (Pro+) — each contains the workflow narrative, this skill provides the plumbing they all rely on. Requires a FlowStudio MCP subscription or compatible server — see https:\u002F\u002Fmcp.flowstudio.app","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fskills\u002Fpower-automate-mcp\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"power automate mcp","power","automate","MCP","node","when","for","plumbing","narrative","tool discovery","app","list","specialized","tool","discovery","server","monitoring","search","auth","workflows","workflow","2026-11-10 10:12:30",false,"---\nname: power-automate-mcp\ndescription: >-\n  Foundation skill for Power Automate via FlowStudio MCP — auth setup, the\n  reusable MCP helper (Python + Node.js), tool discovery via `list_skills` \u002F\n  `tool_search`, and oversized-response handling. Load this skill first when\n  connecting an agent to Power Automate. For specialized workflows, load\n  `power-automate-build`, `power-automate-debug`, `power-automate-monitoring`\n  (Pro+), or `power-automate-governance` (Pro+) — each contains the workflow\n  narrative, this skill provides the plumbing they all rely on. Requires a\n  FlowStudio MCP subscription or compatible server — see https:\u002F\u002Fmcp.flowstudio.app\n---\n\n# Power Automate via FlowStudio MCP — Foundation\n\nThis skill is the **plumbing layer**. It gives an AI agent a reliable way to\ntalk to a FlowStudio MCP server, discover what tools are available, and handle\nthe responses cleanly. The actual workflow narratives live in four specialized\nskills that all build on this one.\n\n> **Real debugging examples**: [Expression error in child flow](https:\u002F\u002Fgithub.com\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fblob\u002Fmain\u002Fexamples\u002Ffix-expression-error.md) |\n> [Data entry, not a flow bug](https:\u002F\u002Fgithub.com\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fblob\u002Fmain\u002Fexamples\u002Fdata-not-flow.md) |\n> [Null value crashes child flow](https:\u002F\u002Fgithub.com\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fblob\u002Fmain\u002Fexamples\u002Fnull-child-flow.md)\n\n> **Requires:** A [FlowStudio](https:\u002F\u002Fmcp.flowstudio.app) MCP subscription (or\n> compatible Power Automate MCP server). You will need:\n> - MCP endpoint: `https:\u002F\u002Fmcp.flowstudio.app\u002Fmcp` (same for all subscribers)\n> - API key \u002F JWT token (`x-api-key` header — NOT Bearer)\n> - In ChatGPT or claude.ai there is no key: add `https:\u002F\u002Fmcp.flowstudio.app\u002Fmcp\u002Foauth`\n>   as a connector and sign in with Microsoft — see the\n>   [ChatGPT walkthrough](https:\u002F\u002Flearn.flowstudio.app\u002Fchatgpt-power-automate)\n> - Power Platform environment name (e.g. `Default-\u003Ctenant-guid>`)\n\n---\n\n## Which Skill to Use When\n\nSkills are organized by **use-case intent**, not by which tools they call.\nMultiple skills reuse the same underlying tools — pick by what the user is\ntrying to accomplish.\n\n| The user wants to… | Load this skill |\n|---|---|\n| Make or change a flow (build new, modify existing, fix a bug, deploy) | **`power-automate-build`** |\n| Diagnose why a flow failed (root cause analysis on a failing run) | **`power-automate-debug`** |\n| See tenant-wide flow health, failure rates, asset inventory | **`power-automate-monitoring`** *(Pro+)* |\n| Tag, audit, classify, score, or offboard flows | **`power-automate-governance`** *(Pro+)* |\n| Just connect, set up auth, write the helper, parse responses | this skill (foundation) |\n\n**Same tools, different lenses.** `power-automate-build` and `power-automate-debug`\nboth call `update_live_flow`, `get_live_flow`, and the run-error tools — they\ndiffer in *direction* (forward vs backward) and *intent* (compose vs diagnose).\n`power-automate-monitoring` and `power-automate-governance` both call the Store\ntools — they differ in *audience* (ops vs compliance) and *outcome* (read\nhealth vs write metadata). Don't try to memorize \"which tools belong to which\nskill\"; pick the skill by what the user is doing.\n\n---\n\n## Source of Truth\n\n| Priority | Source | Covers |\n|----------|--------|--------|\n| 1 | **Real API response** | Always trust what the server actually returns |\n| 2 | **`tool_search` \u002F `list_skills`** | Authoritative tool schemas, parameter names, types, required flags |\n| 3 | **SKILL docs & reference files** | Workflow narrative, response shapes, non-obvious behaviors |\n\nIf documentation disagrees with a real API response, the API wins. Tool schemas\nin this skill (or any other) may lag the server — call `tool_search` to confirm\nthe current shape before invoking a tool you haven't used recently.\n\n---\n\n## How Agents Discover Tools\n\nThe FlowStudio MCP server (v1.1.5+) exposes two **non-billable** meta-tools that\nlet an agent load only the tools relevant to the current task. Use these in\npreference to `tools\u002Flist` (which loads all 30+ schemas at once) or guessing\ntool names.\n\n| Meta-tool | When to call |\n|---|---|\n| `list_skills` | Cold start — see the available bundles (`build-flow`, `create-flow`, `debug-flow`, `monitor-flow`, `discover`, `governance`) and pick one |\n| `tool_search` with `query: \"skill:\u003Cname>\"` | Load the full schema set for one bundle (e.g. `skill:debug-flow`) |\n| `tool_search` with `query: \"select:tool1,tool2\"` | Load specific tools by name (e.g. when chaining across bundles) |\n| `tool_search` with `query: \"\u003Ckeywords>\"` | Free-text search when the user request is ambiguous (e.g. `\"cancel run\"`) |\n\nThe server's `tool_search` bundles are intentionally **narrower than this\nskill family** — they're starter packs of the most-likely-needed tools per\nintent. A workflow skill (e.g. `power-automate-debug`) may pull a bundle and\nthen call `tool_search` again for additional tools as the workflow progresses.\n\n```python\n# Cold start — pick a bundle by intent\nskills = mcp(\"list_skills\", {})\n# [{\"name\": \"debug-flow\", \"description\": \"Investigate why a flow is failing...\",\n#   \"tools\": [\"get_live_flow_runs\", \"get_live_flow_run_error\", ...]}, ...]\n\n# Load schemas for the bundle\ndebug_tools = mcp(\"tool_search\", {\"query\": \"skill:debug-flow\"})\n```\n\nCurrent common bundles:\n\n| Bundle | Use when |\n|---|---|\n| `create-flow` | Creating a brand-new flow; includes environment\u002Fconnection discovery, connector description, dynamic options, and `update_live_flow` |\n| `build-flow` | Reading or modifying an existing flow definition |\n| `debug-flow` | Investigating failed runs and action-level inputs\u002Foutputs |\n| `monitor-flow` | Starting\u002Fstopping, triggering, cancelling, or resubmitting runs |\n| `discover` | Enumerating environments, flows, and connections |\n| `governance` | Pro+ cached-store tagging, maker audit, and metadata updates |\n\n---\n\n## Recommended Language: Python or Node.js\n\nAll examples in this skill family use **Python with `urllib.request`**\n(stdlib — no `pip install` needed). **Node.js** is an equally valid choice:\n`fetch` is built-in from Node 18+, JSON handling is native, and async\u002Fawait\nmaps cleanly onto the request-response pattern of MCP tool calls — making it\na natural fit for teams already working in a JavaScript\u002FTypeScript stack.\n\n| Language | Verdict | Notes |\n|---|---|---|\n| **Python** | Recommended | Clean JSON handling, no escaping issues, all skill examples use it |\n| **Node.js (≥ 18)** | Recommended | Native `fetch` + `JSON.stringify`\u002F`JSON.parse`; no extra packages |\n| PowerShell | Avoid for flow operations | `ConvertTo-Json -Depth` silently truncates nested definitions; quoting and escaping break complex payloads. Acceptable for a quick connectivity smoke-test but not for building or updating flows. |\n| cURL \u002F Bash | Possible but fragile | Shell-escaping nested JSON is error-prone; no native JSON parser |\n\n> **TL;DR — use the Core MCP Helper (Python or Node.js) below.** Both handle\n> JSON-RPC framing, auth, and response parsing in a single reusable function.\n\n---\n\n## Core MCP Helper (Python)\n\nUse this helper throughout all subsequent operations:\n\n```python\nimport json, urllib.request\n\nTOKEN = \"\u003CYOUR_JWT_TOKEN>\"\nMCP   = \"https:\u002F\u002Fmcp.flowstudio.app\u002Fmcp\"\n\ndef mcp(tool, args, cid=1):\n    payload = {\"jsonrpc\": \"2.0\", \"method\": \"tools\u002Fcall\", \"id\": cid,\n               \"params\": {\"name\": tool, \"arguments\": args}}\n    req = urllib.request.Request(MCP, data=json.dumps(payload).encode(),\n        headers={\"x-api-key\": TOKEN, \"Content-Type\": \"application\u002Fjson\",\n                 \"User-Agent\": \"FlowStudio-MCP\u002F1.0\"})\n    try:\n        resp = urllib.request.urlopen(req, timeout=120)\n    except urllib.error.HTTPError as e:\n        body = e.read().decode(\"utf-8\", errors=\"replace\")\n        raise RuntimeError(f\"MCP HTTP {e.code}: {body[:200]}\") from e\n    raw = json.loads(resp.read())\n    if \"error\" in raw:\n        raise RuntimeError(f\"MCP error: {json.dumps(raw['error'])}\")\n    text = raw[\"result\"][\"content\"][0][\"text\"]\n    return json.loads(text)\n```\n\n> **Common auth errors:**\n> - HTTP 401\u002F403 → token is missing, expired, or malformed. Get a fresh JWT from [mcp.flowstudio.app](https:\u002F\u002Fmcp.flowstudio.app).\n> - HTTP 400 → malformed JSON-RPC payload. Check `Content-Type: application\u002Fjson` and body structure.\n> - `MCP error: {\"code\": -32602, ...}` → wrong or missing tool arguments. Call `tool_search` with `select:\u003Ctoolname>` to confirm the schema.\n\n---\n\n## Core MCP Helper (Node.js)\n\nEquivalent helper for Node.js 18+ (built-in `fetch` — no packages required):\n\n```js\nconst TOKEN = \"\u003CYOUR_JWT_TOKEN>\";\nconst MCP   = \"https:\u002F\u002Fmcp.flowstudio.app\u002Fmcp\";\n\nasync function mcp(tool, args, cid = 1) {\n  const payload = {\n    jsonrpc: \"2.0\",\n    method: \"tools\u002Fcall\",\n    id: cid,\n    params: { name: tool, arguments: args },\n  };\n  const res = await fetch(MCP, {\n    method: \"POST\",\n    headers: {\n      \"x-api-key\": TOKEN,\n      \"Content-Type\": \"application\u002Fjson\",\n      \"User-Agent\": \"FlowStudio-MCP\u002F1.0\",\n    },\n    body: JSON.stringify(payload),\n  });\n  if (!res.ok) {\n    const body = await res.text();\n    throw new Error(`MCP HTTP ${res.status}: ${body.slice(0, 200)}`);\n  }\n  const raw = await res.json();\n  if (raw.error) throw new Error(`MCP error: ${JSON.stringify(raw.error)}`);\n  return JSON.parse(raw.result.content[0].text);\n}\n```\n\n> Requires Node.js 18+. For older Node, replace `fetch` with `https.request`\n> from the stdlib or install `node-fetch`.\n\n---\n\n## Verify the Connection\n\nA 3-line smoke test that confirms the token, endpoint, and helper all work:\n\n```python\nskills = mcp(\"list_skills\", {})\nprint(f\"Connected — {len(skills)} skill bundles available:\",\n      [s[\"name\"] for s in skills])\n```\n\nExpected output:\n\n```text\nConnected — 6 skill bundles available: ['build-flow', 'create-flow', 'debug-flow', 'monitor-flow', 'discover', 'governance']\n```\n\nIf this fails, see the **Common auth errors** note above. If it succeeds, hand\noff to the workflow skill matching the user's intent.\n\n---\n\n## Handling Oversized Responses\n\nSome MCP tool responses are large enough to overflow the agent's context window:\n\n| Tool | Typical size | Cause |\n|---|---|---|\n| `describe_live_connector` | 100-600 KB | Full Swagger spec for a connector |\n| `get_live_dynamic_properties` | 50-500 KB | Dynamic connector field schemas such as SharePoint list columns |\n| `get_live_flow_run_action_outputs` (no `actionName`) | 50 KB – several MB | Top-level action outputs; with an action in a foreach, every repetition can be returned |\n| `get_live_flow` (large flows) | 50-500 KB | Deeply nested branches |\n| `list_live_flows` (large tenants) | 50-200 KB | Hundreds of flow records |\n\n### When the harness spills to a file\n\nAgent harnesses (Claude Code, VS Code Copilot, etc.) save oversized responses\nto a temp file (e.g. `tool-results\u002Fmcp-flowstudio-describe_live_connector-NNNN.txt`)\nand return the path instead of the inline JSON. The file is **double-wrapped** —\nthe outer MCP envelope plus the inner JSON-escaped payload:\n\n```text\n[{\"type\":\"text\",\"text\":\"\u003CJSON-escaped payload>\"}]\n```\n\nTwo parses to reach a usable object:\n\n```python\nimport json\nwith open(path) as f:\n    raw = json.loads(f.read())\npayload = json.loads(raw[0][\"text\"])\n```\n\n```powershell\n$payload = ((Get-Content $path -Raw | ConvertFrom-Json)[0].text) | ConvertFrom-Json\n```\n\n### Rules of thumb\n\n1. **Extract, don't echo.** Pull the specific field(s) you need (one `operationId`, one action's outputs) and discard the rest before reasoning about it.\n2. **Always pass `actionName` to `get_live_flow_run_action_outputs`.** Omitting it fetches all top-level actions. For actions inside a foreach, passing `actionName` without `iterationIndex` can return every repetition of that action.\n3. **Reuse the spill file within a session.** Refetching the same connector swagger costs 30+ seconds and produces another spill — cache the path.\n4. **Don't grep the spill file for JSON keys directly.** Strings are JSON-escaped inside the file (`\\\"OperationId\\\":`), so a plain grep for `\"OperationId\":` will not match. Parse first, then filter.\n5. **Summarize tool output to the user.** Echo `name + state + trigger` for flow lists and `actionName + status + code` for run errors — not raw JSON, unless asked.\n\n```python\n# Good — drill into one operation in a connector swagger\nconn = mcp(\"describe_live_connector\", {\"environmentName\": ENV, \"connectorName\": \"shared_sharepointonline\"})\nop = conn[\"properties\"][\"swagger\"][\"paths\"][\"\u002Fdatasets\u002F{dataset}\u002Ftables\u002F{table}\u002Fitems\"][\"get\"]\nprint(op[\"operationId\"], \"—\", op.get(\"summary\"))\n\n# Bad — keeping the whole 500 KB swagger in context\nprint(json.dumps(conn, indent=2))   # don't do this\n```\n\n---\n\n## Auth & Connection Notes\n\n| Field | Value |\n|---|---|\n| Auth header | `x-api-key: \u003CJWT>` — **not** `Authorization: Bearer` |\n| Token format | Plain JWT — do not strip, alter, or prefix it |\n| Timeout | Use ≥ 120 s for `get_live_flow_run_action_outputs` (large outputs) |\n| Environment name | `Default-\u003Ctenant-guid>` (find it via `list_live_environments` or `list_live_flows` response) |\n\n---\n\n## Reference Files\n\n- [MCP-BOOTSTRAP.md](references\u002FMCP-BOOTSTRAP.md) — endpoint, auth, request\u002Fresponse format (read this first)\n- [tool-reference.md](references\u002Ftool-reference.md) — response shapes and behavioral notes (parameters are in `tool_search`)\n- [action-types.md](references\u002Faction-types.md) — Power Automate action type patterns\n- [connection-references.md](references\u002Fconnection-references.md) — connector reference guide\n","# Power Automate via FlowStudio MCP — Foundation\n\nThis skill is the **plumbing layer**. It gives an AI agent a reliable way to\ntalk to a FlowStudio MCP server, discover what tools are available, and handle\nthe responses cleanly. The actual workflow narratives live in four specialized\nskills that all build on this one.\n\n> **Real debugging examples**: [Expression error in child flow](https:\u002F\u002Fgithub.com\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fblob\u002Fmain\u002Fexamples\u002Ffix-expression-error.md) |\n> [Data entry, not a flow bug](https:\u002F\u002Fgithub.com\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fblob\u002Fmain\u002Fexamples\u002Fdata-not-flow.md) |\n> [Null value crashes child flow](https:\u002F\u002Fgithub.com\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fblob\u002Fmain\u002Fexamples\u002Fnull-child-flow.md)\n\n> **Requires:** A [FlowStudio](https:\u002F\u002Fmcp.flowstudio.app) MCP subscription (or\n> compatible Power Automate MCP server). You will need:\n> - MCP endpoint: `https:\u002F\u002Fmcp.flowstudio.app\u002Fmcp` (same for all subscribers)\n> - API key \u002F JWT token (`x-api-key` header — NOT Bearer)\n> - In ChatGPT or claude.ai there is no key: add `https:\u002F\u002Fmcp.flowstudio.app\u002Fmcp\u002Foauth`\n>   as a connector and sign in with Microsoft — see the\n>   [ChatGPT walkthrough](https:\u002F\u002Flearn.flowstudio.app\u002Fchatgpt-power-automate)\n> - Power Platform environment name (e.g. `Default-\u003Ctenant-guid>`)\n\n---\n\n## Which Skill to Use When\n\nSkills are organized by **use-case intent**, not by which tools they call.\nMultiple skills reuse the same underlying tools — pick by what the user is\ntrying to accomplish.\n\n| The user wants to… | Load this skill |\n|---|---|\n| Make or change a flow (build new, modify existing, fix a bug, deploy) | **`power-automate-build`** |\n| Diagnose why a flow failed (root cause analysis on a failing run) | **`power-automate-debug`** |\n| See tenant-wide flow health, failure rates, asset inventory | **`power-automate-monitoring`** *(Pro+)* |\n| Tag, audit, classify, score, or offboard flows | **`power-automate-governance`** *(Pro+)* |\n| Just connect, set up auth, write the helper, parse responses | this skill (foundation) |\n\n**Same tools, different lenses.** `power-automate-build` and `power-automate-debug`\nboth call `update_live_flow`, `get_live_flow`, and the run-error tools — they\ndiffer in *direction* (forward vs backward) and *intent* (compose vs diagnose).\n`power-automate-monitoring` and `power-automate-governance` both call the Store\ntools — they differ in *audience* (ops vs compliance) and *outcome* (read\nhealth vs write metadata). Don't try to memorize \"which tools belong to which\nskill\"; pick the skill by what the user is doing.\n\n---\n\n## Source of Truth\n\n| Priority | Source | Covers |\n|----------|--------|--------|\n| 1 | **Real API response** | Always trust what the server actually returns |\n| 2 | **`tool_search` \u002F `list_skills`** | Authoritative tool schemas, parameter names, types, required flags |\n| 3 | **SKILL docs & reference files** | Workflow narrative, response shapes, non-obvious behaviors |\n\nIf documentation disagrees with a real API response, the API wins. Tool schemas\nin this skill (or any other) may lag the server — call `tool_search` to confirm\nthe current shape before invoking a tool you haven't used recently.\n\n---\n\n## How Agents Discover Tools\n\nThe FlowStudio MCP server (v1.1.5+) exposes two **non-billable** meta-tools that\nlet an agent load only the tools relevant to the current task. Use these in\npreference to `tools\u002Flist` (which loads all 30+ schemas at once) or guessing\ntool names.\n\n| Meta-tool | When to call |\n|---|---|\n| `list_skills` | Cold start — see the available bundles (`build-flow`, `create-flow`, `debug-flow`, `monitor-flow`, `discover`, `governance`) and pick one |\n| `tool_search` with `query: \"skill:\u003Cname>\"` | Load the full schema set for one bundle (e.g. `skill:debug-flow`) |\n| `tool_search` with `query: \"select:tool1,tool2\"` | Load specific tools by name (e.g. when chaining across bundles) |\n| `tool_search` with `query: \"\u003Ckeywords>\"` | Free-text search when the user request is ambiguous (e.g. `\"cancel run\"`) |\n\nThe server's `tool_search` bundles are intentionally **narrower than this\nskill family** — they're starter packs of the most-likely-needed tools per\nintent. A workflow skill (e.g. `power-automate-debug`) may pull a bundle and\nthen call `tool_search` again for additional tools as the workflow progresses.\n\n```python\n# Cold start — pick a bundle by intent\nskills = mcp(\"list_skills\", {})\n# [{\"name\": \"debug-flow\", \"description\": \"Investigate why a flow is failing...\",\n#   \"tools\": [\"get_live_flow_runs\", \"get_live_flow_run_error\", ...]}, ...]\n\n# Load schemas for the bundle\ndebug_tools = mcp(\"tool_search\", {\"query\": \"skill:debug-flow\"})\n```\n\nCurrent common bundles:\n\n| Bundle | Use when |\n|---|---|\n| `create-flow` | Creating a brand-new flow; includes environment\u002Fconnection discovery, connector description, dynamic options, and `update_live_flow` |\n| `build-flow` | Reading or modifying an existing flow definition |\n| `debug-flow` | Investigating failed runs and action-level inputs\u002Foutputs |\n| `monitor-flow` | Starting\u002Fstopping, triggering, cancelling, or resubmitting runs |\n| `discover` | Enumerating environments, flows, and connections |\n| `governance` | Pro+ cached-store tagging, maker audit, and metadata updates |\n\n---\n\n## Recommended Language: Python or Node.js\n\nAll examples in this skill family use **Python with `urllib.request`**\n(stdlib — no `pip install` needed). **Node.js** is an equally valid choice:\n`fetch` is built-in from Node 18+, JSON handling is native, and async\u002Fawait\nmaps cleanly onto the request-response pattern of MCP tool calls — making it\na natural fit for teams already working in a JavaScript\u002FTypeScript stack.\n\n| Language | Verdict | Notes |\n|---|---|---|\n| **Python** | Recommended | Clean JSON handling, no escaping issues, all skill examples use it |\n| **Node.js (≥ 18)** | Recommended | Native `fetch` + `JSON.stringify`\u002F`JSON.parse`; no extra packages |\n| PowerShell | Avoid for flow operations | `ConvertTo-Json -Depth` silently truncates nested definitions; quoting and escaping break complex payloads. Acceptable for a quick connectivity smoke-test but not for building or updating flows. |\n| cURL \u002F Bash | Possible but fragile | Shell-escaping nested JSON is error-prone; no native JSON parser |\n\n> **TL;DR — use the Core MCP Helper (Python or Node.js) below.** Both handle\n> JSON-RPC framing, auth, and response parsing in a single reusable function.\n\n---\n\n## Core MCP Helper (Python)\n\nUse this helper throughout all subsequent operations:\n\n```python\nimport json, urllib.request\n\nTOKEN = \"\u003CYOUR_JWT_TOKEN>\"\nMCP   = \"https:\u002F\u002Fmcp.flowstudio.app\u002Fmcp\"\n\ndef mcp(tool, args, cid=1):\n    payload = {\"jsonrpc\": \"2.0\", \"method\": \"tools\u002Fcall\", \"id\": cid,\n               \"params\": {\"name\": tool, \"arguments\": args}}\n    req = urllib.request.Request(MCP, data=json.dumps(payload).encode(),\n        headers={\"x-api-key\": TOKEN, \"Content-Type\": \"application\u002Fjson\",\n                 \"User-Agent\": \"FlowStudio-MCP\u002F1.0\"})\n    try:\n        resp = urllib.request.urlopen(req, timeout=120)\n    except urllib.error.HTTPError as e:\n        body = e.read().decode(\"utf-8\", errors=\"replace\")\n        raise RuntimeError(f\"MCP HTTP {e.code}: {body[:200]}\") from e\n    raw = json.loads(resp.read())\n    if \"error\" in raw:\n        raise RuntimeError(f\"MCP error: {json.dumps(raw['error'])}\")\n    text = raw[\"result\"][\"content\"][0][\"text\"]\n    return json.loads(text)\n```\n\n> **Common auth errors:**\n> - HTTP 401\u002F403 → token is missing, expired, or malformed. Get a fresh JWT from [mcp.flowstudio.app](https:\u002F\u002Fmcp.flowstudio.app).\n> - HTTP 400 → malformed JSON-RPC payload. Check `Content-Type: application\u002Fjson` and body structure.\n> - `MCP error: {\"code\": -32602, ...}` → wrong or missing tool arguments. Call `tool_search` with `select:\u003Ctoolname>` to confirm the schema.\n\n---\n\n## Core MCP Helper (Node.js)\n\nEquivalent helper for Node.js 18+ (built-in `fetch` — no packages required):\n\n```js\nconst TOKEN = \"\u003CYOUR_JWT_TOKEN>\";\nconst MCP   = \"https:\u002F\u002Fmcp.flowstudio.app\u002Fmcp\";\n\nasync function mcp(tool, args, cid = 1) {\n  const payload = {\n    jsonrpc: \"2.0\",\n    method: \"tools\u002Fcall\",\n    id: cid,\n    params: { name: tool, arguments: args },\n  };\n  const res = await fetch(MCP, {\n    method: \"POST\",\n    headers: {\n      \"x-api-key\": TOKEN,\n      \"Content-Type\": \"application\u002Fjson\",\n      \"User-Agent\": \"FlowStudio-MCP\u002F1.0\",\n    },\n    body: JSON.stringify(payload),\n  });\n  if (!res.ok) {\n    const body = await res.text();\n    throw new Error(`MCP HTTP ${res.status}: ${body.slice(0, 200)}`);\n  }\n  const raw = await res.json();\n  if (raw.error) throw new Error(`MCP error: ${JSON.stringify(raw.error)}`);\n  return JSON.parse(raw.result.content[0].text);\n}\n```\n\n> Requires Node.js 18+. For older Node, replace `fetch` with `https.request`\n> from the stdlib or install `node-fetch`.\n\n---\n\n## Verify the Connection\n\nA 3-line smoke test that confirms the token, endpoint, and helper all work:\n\n```python\nskills = mcp(\"list_skills\", {})\nprint(f\"Connected — {len(skills)} skill bundles available:\",\n      [s[\"name\"] for s in skills])\n```\n\nExpected output:\n\n```text\nConnected — 6 skill bundles available: ['build-flow', 'create-flow', 'debug-flow', 'monitor-flow', 'discover', 'governance']\n```\n\nIf this fails, see the **Common auth errors** note above. If it succeeds, hand\noff to the workflow skill matching the user's intent.\n\n---\n\n## Handling Oversized Responses\n\nSome MCP tool responses are large enough to overflow the agent's context window:\n\n| Tool | Typical size | Cause |\n|---|---|---|\n| `describe_live_connector` | 100-600 KB | Full Swagger spec for a connector |\n| `get_live_dynamic_properties` | 50-500 KB | Dynamic connector field schemas such as SharePoint list columns |\n| `get_live_flow_run_action_outputs` (no `actionName`) | 50 KB – several MB | Top-level action outputs; with an action in a foreach, every repetition can be returned |\n| `get_live_flow` (large flows) | 50-500 KB | Deeply nested branches |\n| `list_live_flows` (large tenants) | 50-200 KB | Hundreds of flow records |\n\n### When the harness spills to a file\n\nAgent harnesses (Claude Code, VS Code Copilot, etc.) save oversized responses\nto a temp file (e.g. `tool-results\u002Fmcp-flowstudio-describe_live_connector-NNNN.txt`)\nand return the path instead of the inline JSON. The file is **double-wrapped** —\nthe outer MCP envelope plus the inner JSON-escaped payload:\n\n```text\n[{\"type\":\"text\",\"text\":\"\u003CJSON-escaped payload>\"}]\n```\n\nTwo parses to reach a usable object:\n\n```python\nimport json\nwith open(path) as f:\n    raw = json.loads(f.read())\npayload = json.loads(raw[0][\"text\"])\n```\n\n```powershell\n$payload = ((Get-Content $path -Raw | ConvertFrom-Json)[0].text) | ConvertFrom-Json\n```\n\n### Rules of thumb\n\n1. **Extract, don't echo.** Pull the specific field(s) you need (one `operationId`, one action's outputs) and discard the rest before reasoning about it.\n2. **Always pass `actionName` to `get_live_flow_run_action_outputs`.** Omitting it fetches all top-level actions. For actions inside a foreach, passing `actionName` without `iterationIndex` can return every repetition of that action.\n3. **Reuse the spill file within a session.** Refetching the same connector swagger costs 30+ seconds and produces another spill — cache the path.\n4. **Don't grep the spill file for JSON keys directly.** Strings are JSON-escaped inside the file (`\\\"OperationId\\\":`), so a plain grep for `\"OperationId\":` will not match. Parse first, then filter.\n5. **Summarize tool output to the user.** Echo `name + state + trigger` for flow lists and `actionName + status + code` for run errors — not raw JSON, unless asked.\n\n```python\n# Good — drill into one operation in a connector swagger\nconn = mcp(\"describe_live_connector\", {\"environmentName\": ENV, \"connectorName\": \"shared_sharepointonline\"})\nop = conn[\"properties\"][\"swagger\"][\"paths\"][\"\u002Fdatasets\u002F{dataset}\u002Ftables\u002F{table}\u002Fitems\"][\"get\"]\nprint(op[\"operationId\"], \"—\", op.get(\"summary\"))\n\n# Bad — keeping the whole 500 KB swagger in context\nprint(json.dumps(conn, indent=2))   # don't do this\n```\n\n---\n\n## Auth & Connection Notes\n\n| Field | Value |\n|---|---|\n| Auth header | `x-api-key: \u003CJWT>` — **not** `Authorization: Bearer` |\n| Token format | Plain JWT — do not strip, alter, or prefix it |\n| Timeout | Use ≥ 120 s for `get_live_flow_run_action_outputs` (large outputs) |\n| Environment name | `Default-\u003Ctenant-guid>` (find it via `list_live_environments` or `list_live_flows` response) |\n\n---\n\n## Reference Files\n\n- [MCP-BOOTSTRAP.md](references\u002FMCP-BOOTSTRAP.md) — endpoint, auth, request\u002Fresponse format (read this first)\n- [tool-reference.md](references\u002Ftool-reference.md) — response shapes and behavioral notes (parameters are in `tool_search`)\n- [action-types.md](references\u002Faction-types.md) — Power Automate action type patterns\n- [connection-references.md](references\u002Fconnection-references.md) — connector reference guide\n",{"name":5,"description":7},"main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fskills\u002Fpower-automate-mcp",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill power-automate-mcp",{"tool":66,"command":67},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill power-automate-mcp",{"tool":69,"command":70},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill power-automate-mcp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fskills\u002Fpower-automate-mcp\u002FSKILL.md",true,[74,80,84,88],{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Faction-types.md","REFERENCE","参考文档",3940,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fskills\u002Fpower-automate-mcp\u002Freferences\u002Faction-types.md",{"path":81,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fconnection-references.md",5063,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fskills\u002Fpower-automate-mcp\u002Freferences\u002Fconnection-references.md",{"path":85,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002FMCP-BOOTSTRAP.md",2413,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fskills\u002Fpower-automate-mcp\u002Freferences\u002FMCP-BOOTSTRAP.md",{"path":89,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Ftool-reference.md",20410,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fninihen1\u002Fpower-automate-mcp-skills\u002Fskills\u002Fpower-automate-mcp\u002Freferences\u002Ftool-reference.md",[93,103,111,119,127,135],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":102},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":107,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":102},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":102},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":102},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":102},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":139,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":102},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]