Skip to main content
Glama

Scaffold a cloud flow (experimental)

cs_add_flow

Add a callable flow to a Copilot Studio agent by generating workflow files with an agent-call trigger and response. Preview changes first, then confirm to write.

Instructions

EXPERIMENTAL: write workflows//metadata.yaml + workflow.json for a flow with the 'when an agent calls the flow' trigger and a response, optionally exposing it as a tool. Format follows the schema's CloudFlowDefinition and the Power Automate solution JSON; verify with cs_pack and in the portal after push. The first call changes nothing: it returns the files it would write, as a diff against what is there now, for the user to approve. Call it again with the same arguments plus confirm: true to write them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
inputsNo
actionsNoExtra Power Automate actions (name -> definition) inserted before the response
addToolNoAlso create actions/<name>.mcs.yml invoking this flow
confirmNoRequired to write the change to the file. Without it the tool returns a preview - the changed lines against the current ones, and the character count - and writes nothing.
outputsNo
overwriteNo
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.7
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Required to write the change to the file. Without it the tool returns a preview - the changed lines against the current ones, and the character count - and writes nothing.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.5

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does it well: it discloses the experimental status, exact files written, the dry-run-then-confirm mutation pattern, and the optional tool scaffold. It is explicit that the first call changes nothing, which is critical for an agent to avoid unintended writes.

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 compact and front-loaded with the essential purpose. Each sentence contributes something distinct: the scaffold target and trigger, the format/verification expectation, and the explicit two-call confirmation workflow. No filler or redundancy.

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 core behavior is well covered and the dry-run/confirm mechanism is explained. But for a 9-parameter tool with no output schema and low parameter description coverage, the description still omits meaningful guidance on inputs, outputs, overwrite semantics, and the precise shape of the return value beyond 'a diff.'

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

Parameters2/5

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

Schema description coverage is only 44%, so the description needed to compensate for the undocumented parameters. It adds value for name, confirm, and addTool, but leaves inputs, outputs, overwrite, and description semantically unexplained, forcing the agent to guess at their meaning from bare schema structure.

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 concrete action: write workflows/<Name>/metadata.yaml + workflow.json for a flow with the 'when an agent calls the flow' trigger and a response. It also clarifies the optional tool-exposure side effect, making the tool's specific role clear among many flow-related siblings.

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 gives clear procedural context: first call produces a diff and writes nothing; a second call with confirm: true writes the files. It also advises verifying with cs_pack and in the portal after push. However, it does not explicitly contrast this tool with alternatives like cs_create_flow or cs_add_tool.

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