Skip to main content
Glama
karenrebecag

Power Automate MCP

by karenrebecag

Power Automate MCP

Un servidor MCP local que permite a un agente de IA inspeccionar y editar tus flujos de nube personales de Power Automate — autenticado con tu propia cuenta de Microsoft, sin consentimiento de administrador y sin suscripción de pago.

Existe porque las alternativas alojadas cobran una cuota mensual por envolver una API que Microsoft ya expone a tu cuenta de forma gratuita — y porque el portal de Power Automate es una interfaz pobre cuando prefieres describir el cambio y dejar que un agente lo aplique bajo salvaguardas. Este repositorio es el informe de ingeniería inversa de cómo funciona realmente esa API, empaquetado como una herramienta funcional.

Proyecto personal, proporcionado tal cual. Lee la nota de fiabilidad y docs/SECURITY.md antes de depender de él.

No está afiliado ni respaldado por Microsoft.


La parte interesante: cómo se autentica sin pedir permiso a TI

Todos los tutoriales de "gestionar Power Automate desde código" te dicen que registres una aplicación en Entra ID y consigas que un administrador dé su consentimiento a Dynamics CRM user_impersonation o Flows.Manage.All. En un inquilino corporativo restringido, esa solicitud es un obstáculo — concede una entidad de servicio permanente, y los administradores (con razón) dicen que no.

Este proyecto evita eso por completo usando un ID de cliente público de primera parte que Microsoft incluye para herramientas interactivas:

51f81489-12ee-4a9e-aaae-a2591f45987d   ("Dynamics 365 Example Client", of XrmToolBox fame)

Impulsado mediante el flujo de concesión de código de dispositivo de OAuth 2.0, este es un inicio de sesión delegado: el token lleva tu identidad y tus permisos, no hay ninguna entidad de servicio que alguien deba aprobar, y no aparece ninguna pantalla de consentimiento. Puedes hablar con Power Automate desde tu portátil con exactamente los derechos que ya tienes en el portal — ni más, ni menos.

La audiencia del token tiene una peculiaridad no obvia que merece documentarse:

https://service.flow.microsoft.com//user_impersonation
                                  ^^ two slashes, on purpose

El URI de recurso heredado termina en barra y la sintaxis de ámbito v2 añade /user_impersonation, produciendo la doble barra. Algunos inquilinos rechazan la forma de barra simple. Esa única cadena es la diferencia entre un inicio de sesión que funciona y un error opaco AADSTS.

Related MCP server: MCP Power Automate

La otra parte interesante: dos APIs que ven flujos diferentes

Hay dos backends REST y no son intercambiables:

api.flow.microsoft.com

api.powerplatform.com

Estado

No documentado, no soportado

Oficial, documentado (2024-10-01)

Ve flujos personales

Sí

No — 404 sin Dataverse

Ve flujos de solución

Sí

Sí

Para qué lo usamos

Todo (flujos personales)

Conectado, inactivo

La lección que costó más investigación: la API soportada no puede ver flujos personales en absoluto. Requiere que el flujo viva en una solución de Dataverse. Así que cualquier herramienta que gestione los flujos que un usuario normal crea en el portal — incluidos todos los MCP de pago — no tiene más remedio que usar la API de servicio no soportada. Este proyecto hace explícito ese compromiso en lugar de ocultarlo.

src/client/flow-api.ts mantiene ambas URLs base detrás de un único interruptor, de modo que un flujo que luego se mueva a una solución (o un futuro donde la API de servicio finalmente se rompa) es un cambio de una constante, no una reescritura.


Nota de fiabilidad (lee esto)

api.flow.microsoft.com está no documentada y no soportada por Microsoft. Puede cambiar de forma o desaparecer sin previo aviso, y esta herramienta se romperá cuando eso ocurra. Ese riesgo es precisamente lo que los servicios de pago cobran por absorber en tu nombre. Para una herramienta personal donde arreglas las cosas tú mismo, es un buen intercambio. Para algo crítico, no lo es. Elige en consecuencia.

Todo se ejecuta como tú. Si pierdes acceso a la cuenta, la herramienta deja de funcionar — no hay ninguna identidad de servicio detrás.


Instalación

Requisitos: Node 18+ (para fetch integrado) y pnpm. Una cuenta de Microsoft de trabajo o escuela que pueda usar Power Automate — nada más.

git clone https://github.com/karenrebecag/PowerAutomate_MCP.git
cd PowerAutomate_MCP
pnpm install
pnpm build

Credenciales — inicia sesión una vez

No hay archivo de configuración que editar ni secreto que pegar. La autenticación es un inicio de sesión interactivo de código de dispositivo contra tu propia cuenta de Microsoft:

pnpm login

Imprime una URL y un código corto:

  Power Automate MCP — sign in

  1. Open:  https://microsoft.com/devicelogin
  2. Code:  ABCD-EFGH

  Waiting for you to finish signing in...

Abre la URL, introduce el código, inicia sesión con la cuenta cuyos flujos quieres gestionar y aprueba. Al tener éxito, se escribe un token de actualización en .pa-token (permisos 0600, ignorado por git). El servidor genera tokens de acceso de corta duración automáticamente a partir de él — no se te volverá a preguntar hasta que expire (~90 días de inactividad). Para cambiar de cuenta o recuperarte de un token caducado, simplemente vuelve a ejecutar pnpm login.

Variables de entorno opcionales

Variable

Valor por defecto

Cuándo configurarla

PA_TENANT_ID

organizations

Fija un GUID de inquilino específico si tu cuenta pertenece a varios.

PA_TOKEN_FILE

.pa-token junto al paquete

Almacena el token de actualización en otro lugar.

Verificación (opcional pero recomendada)

pnpm probe ejecuta la Fase 0 — llama a cada endpoint de lectura contra tu inquilino y vuelca las respuestas reales en scratch/ (ignorado por git). Si una ruta devuelve 404 en tu entorno, lo verás aquí en lugar de a mitad de uso. Nada de lo que hace escribe.

pnpm probe

Regístrate con tu cliente MCP

Añade el servidor a la configuración de tu cliente. Para Claude Code es ~/.mcp.json:

{
  "mcpServers": {
    "power-automate": {
      "command": "node",
      "args": ["/absolute/path/to/PowerAutomate_MCP/dist/index.js"]
    }
  }
}

Usa una ruta absoluta a dist/index.js. El servidor encuentra .pa-token relativo a su propia ubicación, por lo que no es necesario establecer ningún directorio de trabajo ni entorno en el cliente. Reinicia el cliente (o reconecta el servidor) y aparecerán las siete herramientas. Una comprobación rápida desde la terminal sin cliente:

printf '%s\n%s\n%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"c","version":"1"}}}' \
  '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
  | node dist/index.js

Herramientas

Herramienta

¿Escribe?

Qué hace

list_environments

no

Cada entorno que la cuenta puede ver. Empieza aquí para el ID de entorno.

list_flows

no

Flujos de nube en un entorno (campos resumidos).

get_flow

no

Definición editable completa + referencias de conexión.

get_flow_runs

no

Historial de ejecuciones recientes: estado, código, tiempos.

get_run_actions

no

Desglose por acción de una ejecución; sigue los enlaces de entradas/salidas para acciones fallidas. La vista de depuración.

set_flow_state

sí

Iniciar / detener un flujo. Muestra una vista previa a menos que pases confirm: true.

create_or_update_flow

sí

Crear o editar un flujo a partir de un objeto de definición. dryRun es el valor por defecto — pasa dryRun: false para escribir realmente.

Flujo de trabajo típico del agente

Inspeccionar / depurar un fallo

list_environments
list_flows(environmentId)
get_flow_runs(environmentId, flowId)
get_run_actions(environmentId, flowId, runName)   → see which action failed

Cambiar una definición de forma segura

get_flow(environmentId, flowId)                   → copy properties.definition
… edit the definition object …
create_or_update_flow(..., dryRun: true)          → default; shows wouldSend
create_or_update_flow(..., dryRun: false)         → only after explicit OK

Ambas herramientas de escritura se niegan a mutar nada hasta que optes explícitamente (dryRun: false / confirm: true). Trátalo como una característica, no como una molestia — una definición incorrecta puede romper una automatización en vivo.

Ejemplo de conversación (para esto sirve)

Tú: ¿Por qué falló "Notificar a ventas sobre el nuevo cliente potencial" esta mañana?

Agente: (list_environments → list_flows → get_flow_runs → get_run_actions) La ejecución a las 09:14 falló en la acción HTTP_To_CRM con 401. La referencia de conexión de token sigue presente en el flujo; la API descendente rechazó la llamada.

Tú: Apaga el flujo hasta que arreglemos la conexión.

Agente: (vista previa de set_flow_state → confirm: true después de que apruebes) Flujo detenido.

Nunca abres el diseñador de Power Automate para ese bucle. El agente usa los mismos permisos que ya tienes en el portal.


Estructura del proyecto

src/
  auth/       device-code login + silent refresh (the interesting bit)
  client/     thin HTTP wrapper over the two REST backends
  core/       shared MCP result helpers
  tools/      one file per MCP tool (added after Phase 0 confirms shapes)
  server.ts   MCP server wiring
  index.ts    stdio transport entry point
scripts/
  probe-endpoints.ts   Phase 0 reconnaissance — run before trusting any tool
docs/
  SECURITY.md          tokens, disk artifacts, blast radius
  DEVELOPMENT.md       how to extend tools without guessing routes

Cómo se construyó (especificación / impulsado por sondeo)

  1. Fase 0 — pnpm probe golpea rutas de lectura en un inquilino real y guarda JSON real bajo scratch/ (ignorado por git).

  2. Las herramientas se tipan e implementan solo contra esas formas.

  3. Las rutas que devuelven 404 o parecen incorrectas se descartan (por ejemplo, list_connections independiente no está en v1; las referencias aún aparecen en get_flow).

  4. Las escrituras se envían con valores por defecto de vista previa para que un agente no pueda aplicar una definición en el primer intento por accidente.

Detalles: docs/DEVELOPMENT.md.

Estado

Funcionando. Siete herramientas (cinco de lectura, dos de escritura), cada una moldeada contra respuestas capturadas por la Fase 0 en un inquilino real. pnpm verify (typecheck + lint + format + tests) es la puerta local.

No en v1: eliminar flujo, flujos de escritorio, APIs de administración de inquilinos, listado de conexiones independiente.

Documentación

Documento

Contenido

docs/SECURITY.md

Archivo de token, radio de explosión delegado, qué no comprometer

docs/DEVELOPMENT.md

Flujo de trabajo de sondeo primero, scripts, añadir herramientas

CLAUDE.md

Reglas estrictas para agentes de codificación que trabajan en este repositorio

Licencia e intención

MIT. Proyecto personal y educativo de ingeniería inversa. Compartido para que otros puedan aprender cómo funciona esta API y construir sus propias herramientas personales sobre ella. Úsalo dentro de tu propia cuenta y las políticas de tu organización.

No está afiliado ni respaldado por Microsoft.

Available Tools

7 tools
create_or_update_flowA

Create a new flow or update an existing one from a definition object. dryRun is the default — pass dryRun:false to actually write. Get the definition shape from get_flow.

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoDefault true — preview only. Pass false to actually write.
flowIdNoFlow ID to update. Omit to CREATE a new flow.
definitionYesThe workflow definition object (properties.definition from get_flow).
displayNameNoDisplay name. Required when creating.
environmentIdYesEnvironment ID.
connectionReferencesNoConnection references map (properties.connectionReferences from get_flow).

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=false, so a write is expected, but the description adds a crucial behavioral detail—the write is skipped by default and only happens when dryRun:false is passed. It does not disclose overwrite semantics or potential side effects beyond those annotations, but the default behavior is important and clearly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no wasted words. The main operation is front-loaded, and the dryRun default and definition source reference are compactly included.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a create-or-update tool with no output schema, the description covers the essential action, the write-default safety mechanism, and how to obtain the definition shape. It does not explicitly explain update-discovery behavior and id handling, but those are largely covered by parameter schema and the description as a whole is sufficient for basic usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description does not need to restate parameter meanings. It adds a light mention of dryRun default and references get_flow for the definition shape, both also reflected in the schema, so it provides marginal additional value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with a specific verb and object: 'Create a new flow or update an existing one from a definition object.' It clearly states both the operation and the resource and distinguishes this from get_flow pointing to a definition source.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage guidance: dry-run is the default and passing dryRun:false performs the actual write, and it directs the user to get_flow for the definition shape. It does not explicitly enumerate alternatives or when not to use this tool, but the context is fairly unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_flowA
Read-only

Full flow definition (triggers, actions, parameters) and connection references.

ParametersJSON Schema
NameRequiredDescriptionDefault
flowIdYesFlow ID (the `name` field from list_flows).
environmentIdYesEnvironment ID.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds the detail that connection references are included, which is useful, but it does not disclose behavioral details such as response shape, error cases, or whether the flow is executed. This is acceptable given the annotations but not exceptional.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, information-dense sentence that front-loads the core purpose and enumerates the key contents without filler. Every word contributes to the agent's understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-by-ID tool, the description adequately covers what the tool returns: full flow definition and connection references. There is no output schema, but the description mitigates this by naming the major response components. It does not mention error behavior or prerequisites, but those are not critical for this low-complexity operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: both environmentId and flowId are fully documented in the input schema, including the note that flowId corresponds to the name field from list_flows. The description adds no additional parameter-level meaning, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the exact resource and scope: a full flow definition including triggers, actions, parameters, and connection references. This clearly distinguishes the tool from siblings like get_flow_runs and get_run_actions, which focus on runs rather than definitions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'full flow definition' makes the intended use obvious: retrieve the complete definition of one flow rather than a list of flows or run-level data. It does not explicitly name alternatives or list exclusions, but the scope is clear enough for an agent to select it correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_flow_runsB
Read-only

Recent run history for a flow: status, code and timing per run.

ParametersJSON Schema
NameRequiredDescriptionDefault
topNoMax runs (default 20).
flowIdYesFlow ID.
environmentIdYesEnvironment ID.

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds the return fields but does not disclose ordering, freshness, pagination behavior, or any caveats about the returned history.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence states the resource and the key output dimensions without filler. Every word contributes to understanding what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only list tool with fully documented parameters, the description is mostly complete. It mentions the key returned aspects, though it could have added ordering or recency behavior; 'Recent' plus the top parameter makes this workable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with flowId, environmentId, and top all individually documented. The description adds no parameter-level meaning beyond restating the general concept, so the schema carries the burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies a specific resource (flow run history) and the data it returns (status, code, timing per run). It is clear enough to distinguish from get_flow, though it does not explicitly contrast with the similar sibling get_run_actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance about when to use this tool versus alternatives like get_flow or get_run_actions, and no mention of prerequisites or context. Usage is only implied by the tool name and the general description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_run_actionsA
Read-only

Per-action breakdown of one run — the debugging view. Follows inputs/outputs links for failed actions by default (or a named action, or all).

ParametersJSON Schema
NameRequiredDescriptionDefault
runIdYesRun ID from get_flow_runs.
flowIdYesFlow ID.
includeIONoFollow inputs/outputs links for: failed actions (default), all, or none.
actionNameNoOnly this action; follows its I/O links.
environmentIdYesEnvironment ID.

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover readOnlyHint=true and openWorldHint=true, lowering the burden on the description. The description adds genuinely useful context beyond annotations: the default behavior of following inputs/outputs links for failed actions, which an agent cannot infer from structured data. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tightly written sentences with zero waste. The primary purpose is front-loaded ('Per-action breakdown... debugging view') and the behavioral detail is delivered efficiently in the second sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a moderate 5-parameter surface with full schema coverage, read-only annotations, and no output schema required, the description explains the purpose and the key default behavior. Nothing essential an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so every parameter (runId, flowId, includeIO, actionName, environmentId) is already documented in the schema. The description's mention of 'failed actions by default (or a named action, or all)' mirrors the includeIO enum already present in the schema, adding little semantic value beyond it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific resource ('per-action breakdown of one run') with an explicit framing ('the debugging view'). It clearly distinguishes itself from siblings like get_flow_runs (which returns the run list) and get_flow (single flow definition) — this tool drills to the action level of one run.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'debugging view' label implies when to use it, and the action-level scope contrasts with the run-level siblings. However, no alternative is named explicitly and there's no when-not-to-use guidance, so usage is only implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_environmentsA
Read-only

List every Power Platform environment the signed-in account can see.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds the 'every' and 'signed-in account' scope, which complements the openWorldHint by clarifying the visibility boundary, but does not go into details like pagination or environment properties.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single clear sentence with zero waste; the key scoping ('every', 'signed-in account') is front-loaded. Perfectly sized for a no-parameter list tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is sufficient for a simple list operation, but the lack of an output schema and absence of any mention of return format or filtering capabilities leaves minor gaps. However, given the simplicity, it is adequately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters; the schema is empty with 100% coverage, so there is nothing to document. The description adds no parameter meaning, but with no params, this is a baseline high score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool lists every Power Platform environment visible to the signed-in account—a specific verb (list) and resource (environments). It distinguishes from siblings like list_flows which target a different resource type, though it doesn't explicitly name the sibling for comparison.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description and 'signed-in account' context imply it's for browsing available environments, but there is no explicit when-to-use guidance or mention of alternatives among siblings. It's clear enough for obvious cases but lacks explicit routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_flowsA
Read-only

List cloud flows in an environment (summary fields, not the full definition).

ParametersJSON Schema
NameRequiredDescriptionDefault
topNoMax flows to return.
environmentIdYesEnvironment ID from list_environments.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With readOnlyHint=true in annotations, the read-only nature is already declared; the description adds that the result contains summary fields rather than full flow definitions, which is a meaningful output-behavior disclosure. It does not detail pagination or default limits, but the schema's top parameter covers the limit behavior and no contradictions exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with a parenthetical carries the core purpose, scope, and an output caveat with no filler. The actionable verb is front-loaded and every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, read-only list operation, the description plus schema covers the required environmentId and the optional max count, and the summary-fields caveat gives the agent enough to choose the tool and interpret the response at a high level. There is no output schema, and the description does not enumerate exactly which summary fields are returned or any paging behavior, so a small completeness gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline applies. The description adds no parameter-level detail beyond the schema, which already explains environmentId as coming from list_environments and top as the max number of flows to return.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('List'), a concrete resource ('cloud flows'), and a scope ('in an environment'), immediately distinguishing it from get_flow, which returns a single flow's full definition. The parenthetical clarifies that output is summary fields, not full definitions, removing ambiguity about its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly indicates this is the tool to use when you need an inventory/summary of cloud flows within a specific environment, and the 'not the full definition' caveat implies when not to use it. It does not explicitly name a sibling like get_flow as the alternative, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set_flow_stateA

Turn a flow on (start) or off (stop). Previews by default; pass confirm:true to apply.

ParametersJSON Schema
NameRequiredDescriptionDefault
stateYesTurn the flow on (start) or off (stop).
flowIdYesFlow ID.
confirmNoMust be true to actually apply. Omit to preview the intended change.
environmentIdYesEnvironment ID.

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description explicitly discloses the critical behavioral gate: it previews by default and only actually mutates state when confirm:true is passed. Given annotations readOnlyHint=false and openWorldHint=true, this adds the key safety-relevant context an agent needs before invoking the tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no filler: the primary action is front-loaded, followed by the essential preview/confirm caveat. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is sufficient for a simple four-parameter tool: it states the operation, the states, and the confirmation mechanism. It does not describe what the preview output looks like, but since there is no output schema this is a partial gap rather than a serious omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents all parameters, including the meaning of confirm and the start/stop enum. The description adds no new parameter-level information; it merely restates the behavior already captured in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the action ('Turn a flow on/off'), the resource (flow), and the two valid states (start/stop). This makes it clearly distinct from siblings such as list_flows, get_flow, and create_or_update_flow, which concern discovery, reading, or definition changes rather than operational state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The usage is implied: invoke this tool when you want to start or stop a flow, and the preview behavior supports a safe exploratory workflow. However, the description does not explicitly name alternatives such as create_or_update_flow for definition changes, nor does it mention when not to use this tool or what prerequisites must exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv0.1.0
    • First observedcreate_or_update_flow
    • First observedget_flow
    • First observedget_flow_runs
    • First observedget_run_actions
    • First observedlist_environments
    • First observedlist_flows
    • First observedset_flow_state

TDQS

A3.9/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct resource/action combination: environments, flow lists, full flow definitions, run history, per-action run details, flow state, and create/update. No two tools overlap in purpose; an agent can easily select the correct tool for a given task.

Naming Consistency4/5

The naming follows a clear verb_noun pattern with verbs like list_, get_, set_, and create_or_update_. The only minor inconsistency is the use of both list_ and get_ for read operations, which could cause slight ambiguity (e.g., list_flows vs get_flow), but the distinction between summary and full definition is established in descriptions.

Tool Count5/5

Seven tools is an appropriate, focused set for a Power Automate management server. The scope is clear, and each tool serves a necessary function without redundancy. This size is large enough to be useful yet small enough to avoid confusion.

Completeness4/5

The toolset covers the main lifecycle operations for flows: listing, retrieving, updating, setting state, and inspecting runs/actions. A notable missing operation is the ability to delete a flow, and there is no explicit way to list all runs across flows, but the core workflows of inspection and modification are well-covered.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers