Add a global variable
cs_add_variableAdd a conversation-scoped variable to a Copilot Studio agent by creating its YAML definition file. Set the name, default value, and optional visibility.
Instructions
Create variables/.variable.mcs.yml (GlobalVariableComponent, conversation scope).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| overwrite | No | ||
| workspace | No | Path to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory. | |
| description | No | ||
| aiVisibility | No | ||
| defaultValue | No |