Edit a topic
cs_edit_topicUpdate an existing Copilot Studio topic by changing its name, description, trigger phrases, priority, or nodes. Get a diff preview first, then confirm to apply changes.
Instructions
Change an existing topic in place, keeping its comment header: rename, description, trigger phrases (set / add / remove), priority, append or insert nodes (same node spec as cs_add_topic), remove top-level nodes by id. Validates the file afterwards. 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
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Topic name, file stem or path | |
| rename | No | ||
| confirm | No | 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. | |
| priority | No | null removes the priority | |
| workspace | No | Path to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory. | |
| description | No | ||
| appendActions | No | ||
| insertActions | No | ||
| removeActionIds | No | ids of top-level nodes (see cs_describe_workspace or the file) | |
| addTriggerPhrases | No | ||
| setTriggerPhrases | No | ||
| removeTriggerPhrases | No |