Skip to main content
Glama
power-automate-mcp

power-automate-mcp

by OwnOptic

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PA_ENV_IDNoOptional. The Power Platform environment ID. Defaults to Default-<PA_TENANT_ID> if not set.
PA_CLIENT_IDYesThe Application (client) ID from the Azure app registration.
PA_TENANT_IDYesThe Directory (tenant) ID from the Azure app registration.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_flowsA

List flows in the environment, newest change first.

state filters client-side on 'Started' or 'Stopped'; leave empty for all. Returns flow_id, display_name, state, modified. Use flow_id with every other tool.

get_flowA

Get one flow with its full definition - the JSON behind the designer's Code view.

Returns the trigger names, action names, and the complete definition dict. Call this before update_flow_definition: the API has no partial update, so you must send the whole definition back, modified.

create_flowA

Create a flow from a workflow-definition dict.

definition is the same JSON the designer shows under Code view. It needs at least triggers and actions.

TWO RULES LEARNED THE HARD WAY:

  1. Declare the magic parameters. If any trigger or action uses a connector (type OpenApiConnection / OpenApiConnectionWebhook / ...Notification), the definition must carry, at top level next to triggers and actions: "parameters": { "$connections": {"defaultValue": {}, "type": "Object"}, "$authentication": {"defaultValue": {}, "type": "SecureObject"} } Without them creation 400s complaining that the TRIGGER is missing '$authentication', which sends you hunting in the wrong place. Harmless to include on connector-free flows, so just always include it.

  2. Creating does not bind connections. A 201 gives you a flow whose connectionReferences is {} and which will not start ("CannotStartUnpublishedSolutionFlow"). For connector flows the working sequence is create(start=False) -> update_flow_definition(with connection_references) -> a start call. Connector-free flows (Recurrence, Request, Compose, HTTP) start immediately, which is why the demo flow uses those.

If the environment has no Connected connection for a connector the definition uses, the result carries missing_connections: [{connector, create_url}]. Show the user create_url - the portal Connections page, where + New connection creates it - then call bind_connection once they have signed in.

Never inline a secret in a definition - it is stored in plaintext on the flow artifact. Use a Power Platform environment variable or Key Vault reference.

Look up connector operationIds and parameter keys rather than guessing them. Guessing produces a flow that saves fine and fails at runtime. With the Microsoft Learn MCP server connected: microsoft_docs_search, then microsoft_docs_fetch on https://learn.microsoft.com/connectors// (large, so search first). That page marks deprecated operations. Where a parameter is typed dynamic it stops at the top-level key - copy the nested shape from get_flow on a working flow.

update_flow_definitionA

Replace a flow's definition. Send the COMPLETE definition - there is no patch semantics.

Standard use: get_flow -> edit the returned definition -> pass it here.

connection_references can be omitted on a flow already bound with bind_connection: the tool reads the live bindings and carries them over (get_flow shows {} for them, so there is nothing to copy by hand). Pass it explicitly only to CHANGE a binding, shaped like {"shared_office365": {"connectionName": "<32-hex connection id>", "source": "Embedded", "id": "/providers/Microsoft.PowerApps/apis/shared_office365"}}.

WHICH FLOWS THIS REACHES, corrected 2026-11-03. The old note here said any flow bound in the maker portal was out of reach. Measured 2026-07-28 on a flow built in My flows in the portal: its references come back with source "Embedded", and a PATCH carrying them succeeds. Keep the action hosts on connectionName exactly as stored. The real limit is SOLUTION flows. Their connections are Dataverse connection references: the PATCH wants connectionReferenceName, and the reference itself cannot be minted through this endpoint. For those, use update_solution_flow_definition in extras.py, which writes the Dataverse row.

bind_connectionA

Bind an existing connection to a flow and start it. The missing step of create_flow.

This is the tool that makes headless connector-flow creation actually work. create_flow returns 201 but leaves connectionReferences empty, and the flow cannot be started ("CannotStartUnpublishedSolutionFlow"). Binding is a separate PATCH that has to carry both the full definition AND the connection reference. This tool does the whole three-step sequence in one call:

1. resolve the connection      (which connectionName for this connector?)
2. PATCH definition + reference
3. start the flow

connector is the connector's logical name, e.g. "shared_office365", "shared_teams", "shared_sharepointonline".

connection_name is the concrete connection id. In the environments measured it is a bare 32-hex GUID ("4f9d05ecf89048a09f58d4f8f718785e"), not "shared-office365-...". Leave it empty and the tool resolves it automatically from the environment's connection list, so a connection created in the portal a minute ago is found even though no flow uses it yet. Only Connected connections count. If several match, it does NOT guess: it returns status "ambiguous" with display names and created times so you can pass one explicitly (the newest is usually the one just created).

THE CONNECTION MUST ALREADY EXIST in the environment. No API reachable with a Flow token can create and authenticate a brand new connection - that is a portal action. If none is found this returns status "not_found" rather than failing, with create_url pointing at the portal Connections page: give the user that link.

A flow with several connectors (say Dataverse + Outlook) is bound in ONE call: name any one of them, and the tool resolves the others by the same rule and saves them together, because the API rejects a save that leaves any connector action unbound. If one is missing it binds nothing and returns status "incomplete", listing each unresolved connector with a create_url. Existing bindings are merged, never dropped.

Does NOT work on solution flows: their connections are Dataverse connection references, which cannot be minted here. Bind those in the portal, or edit the stored definition with update_solution_flow_definition in extras.py.

run_flowA

Trigger a flow now, without waiting for its schedule. You must own the flow.

trigger_name is the trigger's internal name from get_flow ('manual' for button flows, the recurrence trigger's name for scheduled ones).

Note for Request/HTTP-trigger flows: this management endpoint does NOT forward a body, so @triggerBody() evaluates to null here. Call the flow's real HTTP URL if the flow depends on its payload.

Returns immediately - the run is asynchronous. Poll list_runs for the outcome.

list_runsA

List recent runs for a flow, newest first.

status filter: 'Succeeded', 'Failed', 'Cancelled', 'Running'. Empty for all. Returns run_id, status, start_time, end_time. Feed a failed run_id to explain_run.

explain_runA

Diagnose a run: which action failed, with what error, on what inputs.

This is the tool the portal makes you click twelve times to replicate, and the one a generic HTTP wrapper cannot give you, for two reasons:

  1. The error is not on the action record. Failed actions come back with error: null; the message sits in a SAS-signed blob referenced by outputsLink.uri. This tool follows that link for every failed action.

  2. A failure is rarely explained by the failing action alone. The cause is usually in what an EARLIER action produced. So the response pairs the failed action with the outputs of the actions that succeeded before it.

Returns: status overall run status failed_actions [{name, error, inputs}] - resolved error text, not null succeeded [{name, outputs}] - upstream context, in execution order hint where to look first

If failed_actions is empty and status is Failed, the failure was in the trigger, not the body - check the trigger's condition and inputs.

compare_runsA

Diff a failed run against a working one to find what changed.

Use this when explain_run gives you an error that is technically clear but does not tell you WHY this run differed - intermittent failures, "it worked yesterday", data-dependent bugs. The portal makes you open two runs in two tabs and eyeball them side by side.

baseline_run_id is optional. Left empty, the tool finds the most recent Succeeded run of the same flow and uses that.

Returns: diverged_at first action whose status differs - start here status_changes [{action, baseline, failed}] every action that behaved differently output_changes [{action, baseline, failed}] actions that succeeded in BOTH runs but produced different outputs. This is usually the real cause. only_in_failed / only_in_baseline actions that ran in one and not the other, which means a condition or branch evaluated differently

If output_changes is empty and status_changes shows the same action failing both times, the failure is deterministic and the fix is in the definition, not the data.

analyze_flow_healthA

Analyse a flow's recent run history: reliability, failure patterns, duration.

Answers the questions a single run cannot: is this flow flaky or broken? Which action fails most? Is it getting slower? The portal's analytics page shows counts but will not tell you WHICH action is responsible or group failures by cause.

last_n runs are analysed for statistics. Because action-level detail costs one request per run, only sample_failures of the failed runs are opened to attribute causes. The response says how many were sampled - do not read the tally as exhaustive.

Returns: total / succeeded / failed / cancelled / running failure_rate 0.0 to 1.0 over completed runs only duration_seconds {mean, p95, max} across successful runs failing_actions [{action, count, sample_error}] ranked, from the sampled failures verdict plain-language read of the numbers

A single action accounting for nearly all failures means a targeted fix. Failures spread across many actions usually means the trigger data or a connection, not the logic.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 10 tools

Disambiguation4/5

Most tools have clearly distinct purposes: list/get/create/update, run management, and diagnostics are well separated. The one soft overlap is update_flow_definition vs bind_connection, since both PATCH a definition and connection references, but the descriptions explicitly explain when to use each, keeping confusion limited.

Naming Consistency5/5

All names are snake_case and follow a predictable verb_noun pattern (list_flows, get_flow, create_flow, update_flow_definition, run_flow, list_runs, explain_run, compare_runs, analyze_flow_health). No mixed conventions or vague verbs.

Tool Count5/5

At 10 tools the surface is well scoped for a flow-management server: CRUD, execution, and a strong diagnostic suite. Each tool earns its place without bloat.

Completeness3/5

Core lifecycle is covered: create, read, update, run, and rich run diagnostics. However there is no delete_flow, no explicit start/stop or enable/disable tool (bind_connection only implicitly starts), and no cancel_run, which are notable gaps for an agent managing flows end to end.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues