[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77MF874HTGM0HCB7CMJ8Z8G":3,"skill-same:01M77MF874HTGM0HCB7CMJ8Z8G":64},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77MF874HTGM0HCB7CMJ8Z8G","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","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fflowstudio-power-automate-mcp\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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> - 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> - 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","58843b159d7a4050d6b785a98b908cce505c0b92",".agents\u002Fskills\u002Fflowstudio-power-automate-mcp",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill flowstudio-power-automate-mcp",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill flowstudio-power-automate-mcp",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill flowstudio-power-automate-mcp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fflowstudio-power-automate-mcp\u002FSKILL.md",true,[46,52,56,60],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Faction-types.md","REFERENCE","参考文档",3951,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fflowstudio-power-automate-mcp\u002Freferences\u002Faction-types.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fconnection-references.md",5063,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fflowstudio-power-automate-mcp\u002Freferences\u002Fconnection-references.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002FMCP-BOOTSTRAP.md",2413,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fflowstudio-power-automate-mcp\u002Freferences\u002FMCP-BOOTSTRAP.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Ftool-reference.md",19311,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fflowstudio-power-automate-mcp\u002Freferences\u002Ftool-reference.md",[65,72,79,86,93,100],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"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":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[]]