Skip to main content
Glama

Build a flow definition from steps

cs_build_flow_definition

Compose a Power Automate cloud flow definition from a step spec without touching an environment. Returns the definition, connection references, and notes to create or update flows.

Instructions

Compose a Power Automate cloud flow definition from a step spec, without touching any environment: a trigger (agent-callable by default, or manual, HTTP, schedule or a connector trigger) plus steps (connector operations, HTTP calls, conditions, loops, scopes, variables, compose, terminate, response, or raw JSON). Steps run in order. Returns the definition, the connection references it needs and any notes, and can write it to a file. Feed the same spec to cs_create_flow to create the flow, or cs_update_flow to replace an existing one. Use cs_list_connectors and cs_describe_connector to find connector ids, operation ids and their parameters first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
stepsNoSteps in order; each waits for the previous one to succeed
outputsNoWhat the flow answers with (agent-callable and HTTP flows)
triggerNoDefault: 'agent' (When an agent calls the flow)
outputFileNoWrite the definition JSON here as well
descriptionNo
connectionReferencePrefixNoPrefix for generated connection reference names, usually your publisher prefix

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states there are no environment side effects, that steps run in order, what the tool returns (definition, connection references, notes), and that it can write to a file. It does not detail validation or error behavior, but the key safety and output profile is disclosed.

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?

Three dense sentences, each earning its place: purpose and scope, behavior and return value, then related-tool guidance. It is front-loaded with the core purpose and avoids filler.

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 complex tool with 7 parameters and no output schema, the description gives enough context to invoke it correctly: trigger default, supported step types, ordering, return contents, file-writing option, and prerequisite lookup tools. It could specify the return structure in more detail, but the input schema and this workflow guidance are sufficient.

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?

Schema description coverage is 71%, so the schema already documents most parameters. The description adds a useful human-readable summary of supported trigger kinds and step types, and clarifies the relationship between the spec and the create/update tools. It does not add much for 'name' or 'description', but the schema and obvious semantics cover those.

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 a specific verb ('Compose'), a specific resource ('Power Automate cloud flow definition'), and a clear scope ('without touching any environment'). It also differentiates itself from sibling tools by pointing to cs_create_flow and cs_update_flow as the tools that actually create or update the flow, and enumerates supported trigger and step types.

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

Usage Guidelines5/5

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

The description gives explicit workflow guidance: use cs_list_connectors and cs_describe_connector first to discover connector ids and operation ids, and feed the same spec to cs_create_flow or cs_update_flow for actual flow creation/replacement. This tells an agent when to use this tool and what to do instead.

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

Deploy Server

Other Tools