Skip to main content
Glama

Turn a cloud flow on or off

cs_set_flow_state

Switch a Copilot Studio flow between Activated and Draft states. Use it to turn on a flow after binding its connection references or turn it off to stop it from running.

Instructions

Switch a flow on (Activated) or off (Draft). This is the step a solution import leaves for you: flows whose connection references were unbound at import time land switched off. A flow can only be turned on once its connections are bound and its definition is valid. Changes a live environment: requires confirm: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYeson = Activated, off = Draft
flowIdYesFlow (workflow) id
confirmNoRequired to actually perform a change in a live environment. Without it the tool returns a dry run.
clientIdNoEntra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id.
tenantIdNoEntra tenant id. Defaults to the workspace sync metadata, then CPS_TENANT_ID.
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
dataverseUrlNoDataverse URL; default: from the workspace or the environment
environmentIdNoPower Platform environment id (GUID). Defaults to workspace sync metadata or CPS_ENVIRONMENT_ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.2/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 and meets it: it explicitly warns about changing a live environment and requires confirm: true, which sets expectations explicitly. It also notes the prerequisite constraints, adding useful behavioral context.

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 sentences, each serving a distinct purpose: the core action, the typical scenario, and the safety precondition. No wasted words and no redundancy with the schema.

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 mutating tool with no annotations or output schema, the description covers the critical ground: what it does, when to call it, which prerequisites must hold, and the confirmation gate. The only minor gap is no statement about idempotency or what happens if the flow is already in the target state.

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 is 3. The description adds a bit beyond the schema by explaining that confirm is required for real changes, but most per-parameter meaning already lives in the schema, so it does not need to compensate.

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 action ('Switch a flow on (Activated) or off (Draft)') on a clear resource, making it immediately distinguishable from siblings like cs_run_flow or cs_update_flow. The added import-time context reinforces this 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 gives the when-to-use scenario (post-import activation), and clearly states the conditions needed for a successful switch (connections bound, definition valid). It stops short of explicitly naming alternative tools, but the context is enough to prevent misuse.

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