Skip to main content
Glama

Turn a cloud flow on or off

cs_set_flow_state

Activate or deactivate a Copilot Studio flow after solution import. Turn it on once connections are bound and the definition is valid; requires confirm: true in live environments.

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. Changed1 schema field changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
  2. 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, the description carries the full burden and does well: it discloses this mutates a live environment, that confirm: true is required to actually apply, and that a flow can only be activated once connections are bound and the definition is valid. It omits permission/auth requirements and failure behavior, keeping it out of the top band.

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 tight sentences, front-loaded with the action and its two states, then the post-import rationale, then the precondition and the confirm requirement. No 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 an 8-parameter mutation tool with no annotations and no output schema, the description covers what changes, when it is needed, the gating precondition, and the confirm requirement. It leaves auth/identity parameter behavior (clientId, tenantId, workspace) entirely to the schema, which is acceptable given 100% schema coverage.

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 schema already documents every parameter including the on/off enum mapping and confirm semantics. The description restates the state values and confirm requirement but adds no format or interaction detail beyond what the schema provides.

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?

States a specific verb and resource ('Switch a flow on ... or off') and pins the exact state values (Activated/Draft). This clearly separates it from siblings like cs_update_flow (definition edits) and cs_bind_flow_connection (connection binding).

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?

Gives strong when-to-use context: it is the follow-up step after a solution import that left flows off, and it states the precondition (connections bound, definition valid) for turning a flow on. It does not name the sibling to use for binding connections (cs_bind_flow_connection), so it stops just short of explicit alternatives.

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