Skip to main content
Glama

Edit a topic

cs_edit_topic

Modify an existing Copilot Studio topic in place: rename it, update descriptions, trigger phrases, priority, and nodes. Preview changes first, then confirm to write.

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

TableJSON Schema
NameRequiredDescriptionDefault
topicYesTopic name, file stem or path
renameNo
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.
priorityNonull removes the priority
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
descriptionNo
appendActionsNo
insertActionsNo
removeActionIdsNoids of top-level nodes (see cs_describe_workspace or the file)
addTriggerPhrasesNo
setTriggerPhrasesNo
removeTriggerPhrasesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / definitions
      Added value: +{
      +  "__schema0": {
      +    "oneOf": [
      +      {
      +        "properties": {
      +          "speak": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              }
      +            ]
      +          },
      +          "text": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              }
      +            ]
      +          },
      +          "type": {
      +            "const": "message",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "text"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "allowInterruption": {
      +            "type": "boolean"
      +          },
      +          "choices": {
      +            "description": "Multiple-choice options (closed list) instead of an entity",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "entity": {
      +            "enum": [
      +              "String",
      +              "Boolean",
      +              "Number",
      +              "Email",
      +              "Date",
      +              "DateTime",
      +              "PhoneNumber",
      +              "URL",
      +              "Money",
      +              "PersonName",
      +              "City",
      +              "CountryOrRegion",
      +              "Organization",
      +              "Percentage",
      +              "Age",
      +              "Duration",
      +              "Color",
      +              "Language",
      +              "ZipCode",
      +              "StreetAddress",
      +              "File"
      +            ],
      +            "type": "string"
      +          },
      +          "prompt": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "const": "question",
      +            "type": "string"
      +          },
      +          "variable": {
      +            "description": "Topic.Name (prefix optional)",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "prompt",
      +          "variable"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "cases": {
      +            "items": {
      +              "properties": {
      +                "actions": {
      +                  "items": {
      +                    "$ref": "#/definitions/__schema0"
      +                  },
      +                  "type": "array"
      +                },
      +                "condition": {
      +                  "description": "Power Fx, e.g. Topic.Choice = \"Yes\"",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "condition",
      +                "actions"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "else": {
      +            "items": {
      +              "$ref": "#/definitions/__schema0"
      +            },
      +            "type": "array"
      +          },
      +          "type": {
      +            "const": "condition",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "cases"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "replace": {
      +            "type": "boolean"
      +          },
      +          "topic": {
      +            "description": "Topic name or full reference",
      +            "type": "string"
      +          },
      +          "type": {
      +            "const": "redirect",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "topic"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "type": {
      +            "const": "setVariable",
      +            "type": "string"
      +          },
      +          "value": {
      +            "type": [
      +              "string",
      +              "number",
      +              "boolean"
      +            ]
      +          },
      +          "variable": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "variable",
      +          "value"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "autoSend": {
      +            "type": "boolean"
      +          },
      +          "endIfAnswered": {
      +            "type": "boolean"
      +          },
      +          "sources": {
      +            "description": "Restrict to these knowledge sources (file stems from knowledge/, or full references)",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "type": {
      +            "const": "searchKnowledge",
      +            "type": "string"
      +          },
      +          "variable": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "card": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": {},
      +                "propertyNames": {
      +                  "type": "string"
      +                },
      +                "type": "object"
      +              },
      +              {
      +                "type": "string"
      +              }
      +            ],
      +            "description": "Adaptive Card JSON (object or string), version 1.5"
      +          },
      +          "outputTypes": {
      +            "additionalProperties": {
      +              "enum": [
      +                "String",
      +                "Number",
      +                "Boolean"
      +              ],
      +              "type": "string"
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "outputs": {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "description": "Input card: card field id -> Topic variable; omit for a display-only card",
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "type": {
      +            "const": "card",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "card"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "message": {
      +            "description": "Message to the human agent",
      +            "type": "string"
      +          },
      +          "phoneNumber": {
      +            "description": "Transfer to a phone number instead of an agent",
      +            "type": "string"
      +          },
      +          "type": {
      +            "const": "transfer",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "type": {
      +            "const": "endConversation",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "body": {},
      +          "headers": {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "method": {
      +            "enum": [
      +              "Get",
      +              "Post",
      +              "Put",
      +              "Patch",
      +              "Delete"
      +            ],
      +            "type": "string"
      +          },
      +          "responseVariable": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "const": "http",
      +            "type": "string"
      +          },
      +          "url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "url",
      +          "responseVariable"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "flowId": {
      +            "type": "string"
      +          },
      +          "input": {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "output": {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "type": {
      +            "const": "invokeFlow",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "flowId"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "clearTopicQueue": {
      +            "type": "boolean"
      +          },
      +          "type": {
      +            "const": "end",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "node": {
      +            "additionalProperties": {},
      +            "description": "A full DialogAction node; 'id' is added if missing",
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "type": {
      +            "const": "raw",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "node"
      +        ],
      +        "type": "object"
      +      }
      +    ]
      +  }
      +}
    • addedInput schema / properties / appendActions / items / $ref
      Added value: +"#/definitions/__schema0"
    • removedInput schema / properties / appendActions / items / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "speak": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          }
      -        ]
      -      },
      -      "text": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          }
      -        ]
      -      },
      -      "type": {
      -        "const": "message",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "allowInterruption": {
      -        "type": "boolean"
      -      },
      -      "choices": {
      -        "description": "Multiple-choice options (closed list) instead of an entity",
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "entity": {
      -        "enum": [
      -          "String",
      -          "Boolean",
      -          "Number",
      -          "Email",
      -          "Date",
      -          "DateTime",
      -          "PhoneNumber",
      -          "URL",
      -          "Money",
      -          "PersonName",
      -          "City",
      -          "CountryOrRegion",
      -          "Organization",
      -          "Percentage",
      -          "Age",
      -          "Duration",
      -          "Color",
      -          "Language",
      -          "ZipCode",
      -          "StreetAddress",
      -          "File"
      -        ],
      -        "type": "string"
      -      },
      -      "prompt": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "question",
      -        "type": "string"
      -      },
      -      "variable": {
      -        "description": "Topic.Name (prefix optional)",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "prompt",
      -      "variable"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "cases": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "actions": {
      -              "items": {
      -                "$ref": "#/properties/appendActions/items"
      -              },
      -              "type": "array"
      -            },
      -            "condition": {
      -              "description": "Power Fx, e.g. Topic.Choice = \"Yes\"",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "condition",
      -            "actions"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "else": {
      -        "items": {
      -          "$ref": "#/properties/appendActions/items"
      -        },
      -        "type": "array"
      -      },
      -      "type": {
      -        "const": "condition",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "cases"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "replace": {
      -        "type": "boolean"
      -      },
      -      "topic": {
      -        "description": "Topic name or full reference",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "redirect",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "topic"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "type": {
      -        "const": "setVariable",
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": [
      -          "string",
      -          "number",
      -          "boolean"
      -        ]
      -      },
      -      "variable": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "variable",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "autoSend": {
      -        "type": "boolean"
      -      },
      -      "endIfAnswered": {
      -        "type": "boolean"
      -      },
      -      "sources": {
      -        "description": "Restrict to these knowledge sources (file stems from knowledge/, or full references)",
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "type": {
      -        "const": "searchKnowledge",
      -        "type": "string"
      -      },
      -      "variable": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "card": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {},
      -            "type": "object"
      -          },
      -          {
      -            "type": "string"
      -          }
      -        ],
      -        "description": "Adaptive Card JSON (object or string), version 1.5"
      -      },
      -      "outputTypes": {
      -        "additionalProperties": {
      -          "enum": [
      -            "String",
      -            "Number",
      -            "Boolean"
      -          ],
      -          "type": "string"
      -        },
      -        "type": "object"
      -      },
      -      "outputs": {
      -        "additionalProperties": {
      -          "type": "string"
      -        },
      -        "description": "Input card: card field id -> Topic variable; omit for a display-only card",
      -        "type": "object"
      -      },
      -      "type": {
      -        "const": "card",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "card"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "message": {
      -        "description": "Message to the human agent",
      -        "type": "string"
      -      },
      -      "phoneNumber": {
      -        "description": "Transfer to a phone number instead of an agent",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "transfer",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "type": {
      -        "const": "endConversation",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "body": {},
      -      "headers": {
      -        "additionalProperties": {
      -          "type": "string"
      -        },
      -        "type": "object"
      -      },
      -      "method": {
      -        "enum": [
      -          "Get",
      -          "Post",
      -          "Put",
      -          "Patch",
      -          "Delete"
      -        ],
      -        "type": "string"
      -      },
      -      "responseVariable": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "http",
      -        "type": "string"
      -      },
      -      "url": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "url",
      -      "responseVariable"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "flowId": {
      -        "type": "string"
      -      },
      -      "input": {
      -        "additionalProperties": {
      -          "type": "string"
      -        },
      -        "type": "object"
      -      },
      -      "output": {
      -        "additionalProperties": {
      -          "type": "string"
      -        },
      -        "type": "object"
      -      },
      -      "type": {
      -        "const": "invokeFlow",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "flowId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "clearTopicQueue": {
      -        "type": "boolean"
      -      },
      -      "type": {
      -        "const": "end",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "node": {
      -        "additionalProperties": {},
      -        "description": "A full DialogAction node; 'id' is added if missing",
      -        "type": "object"
      -      },
      -      "type": {
      -        "const": "raw",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "node"
      -    ],
      -    "type": "object"
      -  }
      -]
    • removedInput schema / properties / insertActions / additionalProperties
      Removed value: -false
    • changedInput schema / properties / insertActions / properties / actions / items / $ref
      Previous value: -"#/properties/appendActions/items"New value: +"#/definitions/__schema0"
  2. 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"
      +}
  3. First observedv0.1.5

TDQS

A4.5/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 burden and does so well: it discloses the non-obvious two-phase preview/confirm protocol, that validation runs afterward, that the comment header is preserved, and that null priority removes the value. These are exactly the behaviors an agent would otherwise get wrong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the primary action, then the confirm protocol. Mostly dense and efficient, though the parenthetical '(same node spec as cs_add_topic)' and the trailing confirm sentence slightly stretch length for a definition that could tighten.

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 12-parameter mutation tool with nested objects and no output schema, the description gives a coherent mental model: preview-then-confirm, validation, preserved header. It covers the return of the first call (diff/character count) but says little about failure modes or the second call's response.

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

Parameters4/5

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

Schema coverage is only 42%, but the description compensates by naming most functional parameters and their modes (set/add/remove trigger phrases, append vs insert actions, remove by top-level id, null priority). It still leaves topic, workspace and the node structural params to the schema, which is acceptable since the schema documents those.

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+resource ('Change an existing topic in place') and enumerates exactly what can be edited: rename, description, trigger phrases, priority, node append/insert/remove. It also points to cs_add_topic for the shared node spec, so an agent can distinguish it from its closest sibling.

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?

Clearly explains the two-call workflow: the first call previews a diff and changes nothing, and the same call with confirm:true writes. It implies the edit-vs-add split by referencing cs_add_topic, but does not state explicit conditions for choosing this over other mutators.

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