[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ADJQKW0XJSGKHJGZ2GBZBS":3,"skill-same:01M6ADJQKW0XJSGKHJGZ2GBZBS":96},{"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":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6ADJQKW0XJSGKHJGZ2GBZBS","flowstudio-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 `flowstudio-power-automate-build`, `flowstudio-power-automate-debug`, `flowstudio-power-automate-monitoring` (Pro+), or `flowstudio-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","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41162,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fflowstudio-power-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,45,46,47,48],"MCP","power automate mcp","power","automate","flowstudio power automate mcp","when","for","narrative","tool discovery","app","list","specialized","node","discovery","server","monitoring","https","search","governance","debug","setup","auth","workflows","workflow","python","2026-11-10 10:12:30",false,"---\nname: flowstudio-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  `flowstudio-power-automate-build`, `flowstudio-power-automate-debug`, `flowstudio-power-automate-monitoring`\n  (Pro+), or `flowstudio-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) | **`flowstudio-power-automate-build`** |\n| Diagnose why a flow failed (root cause analysis on a failing run) | **`flowstudio-power-automate-debug`** |\n| See tenant-wide flow health, failure rates, asset inventory | **`flowstudio-power-automate-monitoring`** *(Pro+)* |\n| Tag, audit, classify, score, or offboard flows | **`flowstudio-power-automate-governance`** *(Pro+)* |\n| Just connect, set up auth, write the helper, parse responses | this skill (foundation) |\n\n**Same tools, different lenses.** `flowstudio-power-automate-build` and `flowstudio-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`flowstudio-power-automate-monitoring` and `flowstudio-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. `flowstudio-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) | **`flowstudio-power-automate-build`** |\n| Diagnose why a flow failed (root cause analysis on a failing run) | **`flowstudio-power-automate-debug`** |\n| See tenant-wide flow health, failure rates, asset inventory | **`flowstudio-power-automate-monitoring`** *(Pro+)* |\n| Tag, audit, classify, score, or offboard flows | **`flowstudio-power-automate-governance`** *(Pro+)* |\n| Just connect, set up auth, write the helper, parse responses | this skill (foundation) |\n\n**Same tools, different lenses.** `flowstudio-power-automate-build` and `flowstudio-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`flowstudio-power-automate-monitoring` and `flowstudio-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. `flowstudio-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","5269f7ea2d6c3a9bfda5ed878b6726cf509121fd","skills\u002Fflowstudio-power-automate-mcp",5360,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot","https:\u002F\u002Fawesome-copilot.github.com\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-15 04:42:30",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add github\u002Fawesome-copilot --skill flowstudio-power-automate-mcp",{"tool":70,"command":71},"bunx","bunx skills add github\u002Fawesome-copilot --skill flowstudio-power-automate-mcp",{"tool":73,"command":74},"pnpm","pnpm dlx skills add github\u002Fawesome-copilot --skill flowstudio-power-automate-mcp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fflowstudio-power-automate-mcp\u002FSKILL.md",true,[78,84,88,92],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Faction-types.md","REFERENCE","参考文档",3951,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fflowstudio-power-automate-mcp\u002Freferences\u002Faction-types.md",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fconnection-references.md",5063,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fflowstudio-power-automate-mcp\u002Freferences\u002Fconnection-references.md",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002FMCP-BOOTSTRAP.md",2413,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fflowstudio-power-automate-mcp\u002Freferences\u002FMCP-BOOTSTRAP.md",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Ftool-reference.md",20410,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fflowstudio-power-automate-mcp\u002Freferences\u002Ftool-reference.md",[97,105,112,122,152,178],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":104},"01M7B5D8BRA66G07045DF7WDYA","sap-cloud-integration","SAP Cloud Integration (CPI, part of SAP Integration Suite) runtime-specific guidance for building and troubleshooting iFlows. Use when writing or reviewing CPI Groovy scripts, choosing headers vs. exchange properties, designing exception subprocesses, JMS retry, idempotency or data store patterns, or diagnosing adapter errors (SFTP, HTTP\u002FOAuth, SOAP, IDoc, OData, AS2, Cloud Connector) from Message Processing Log (MPL) text. Not for SAP PI\u002FPO, ABAP development, or generic Java\u002FGroovy outside CPI.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsap-cloud-integration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":104},"01M7B5CYRGSG571NH7EJWT5066","on-device-delegate","Saves cloud-model context by briefing one bounded, read-heavy sub-task (more than about 25 KB of prose, or many files that no single command can answer) to the local-coding plugin's on-device worker, which runs on the local MAI Code 1.1 Flash model. Use for log and test triage, summarizing many files, or extracting facts from large inputs. When the user names this skill, call the skill tool in the same response as your first other tool call, never as a separate step.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fon-device-delegate\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":116,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":121},"01M74CBQ0M3ZKGQH8XKQZ2FHB1","scout-issue","Use when a developer wants to find the best GitHub issues to contribute to in a repository. Invoke with \u002Fscout-issue or ask to find good first issues, beginner-friendly issues, or open source work. Asks about experience level, technical skills, time, and contribution type, then searches GitHub issues, scores them, and presents ranked recommendations with match analysis.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fscout-issue\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fscout-issue\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":132,"publishedAt":49},"01M70KXZNX9ES38N2A8M58ZZMZ","supabase-rls-policies","Write, review, and test Supabase Row Level Security (RLS) policies so that one user cannot read or change another user's rows. Use when creating or changing tables, policies, views, or security definer functions in a Supabase project, when reviewing a migration that touches RLS, or when asked to prove user isolation with pgTAP tests that sign in as two users.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsupabase-rls-policies\u002FSKILL.md",[128,131],{"categoryNo":129,"categoryName":130,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[133,134,135,136,137,138,29,139,140,141,142,143,144,145,146,147,148,149,150,151],"supabase rls policies","supabase rls","supabase","rls","project","with","review","change","read","write","security","isolation","tables","as","tests","prove","use","users","functions",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":159,"publishedAt":49},"01M70KWA5YWXDV6V8DZ19E3T2Y","skill-distribution-audit","Audit a skill collection before release or investigate installer omissions, archived\u002Ftemplate leakage, duplicate identities, and manifest drift. Reconcile the intended public source set, distribution manifest, and actual discovery output for a specified consumer version. Includes a deterministic set-comparison helper.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fskill-distribution-audit\u002FSKILL.md",[158],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[160,161,162,163,164,165,166,167,168,169,170,171,172,30,37,173,174,175,176,177],"distribution","skill distribution audit","audit","output","reconcile","release","template","duplicate","investigate","drift","SET","deterministic","installer","comparison","helper","manifest","version","collection",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":182,"sourceHtmlUrl":183,"categories":184,"keywords":190,"publishedAt":49},"01M70KCJPFVW7PPQ49CC5R8JGK","logicapps-custom-code-net10-migration","Migrate Azure Logic Apps Standard local-function custom-code projects from .NET 8 to .NET 10. Use for legacy Logic Apps custom-code workspace upgrades, project\u002Fpackage configuration, custom-worker settings, publication, and integrated VS Code debugging. Not for ordinary .NET applications, standalone Azure Functions, Consumption workflows, or cloud deployment.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FSKILL.md",[185],{"categoryNo":186,"categoryName":187,"taxonomyType":188,"taxonomyTypeDesc":189},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[191,192,193,194,195,196,197,30,137,198,199,200,201,202,203,204,149,205,206,46],"code","logicapps custom code net10 migration","migration","custom","Legacy","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","debugging"]