Skip to main content
Glama

Add an event trigger

cs_add_trigger

Create a trigger YAML file that links a cloud flow to start a Copilot Studio agent. Preview changes as a diff first, then confirm to write them.

Instructions

Create trigger/.trigger.mcs.yml pointing at a cloud flow that starts the agent (WorkflowExternalTrigger). 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
nameYes
flowIdYes
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.
overwriteNo
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observedv0.1.5

TDQS

A3.8/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. It properly discloses the critical two-phase behavior: the first call returns a diff and changes nothing, and the second call with 'confirm: true' writes. This prevents accidental writes, which is essential safety context. However, it does not detail side effects of 'overwrite', 'description', or error conditions, so it's not exhaustive.

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?

The description is two sentences with no filler. The primary action is front-loaded, and the critical two-step usage is explained succinctly. Every sentence adds value: the first defines the artifacts, the second clarifies the safe preview-then-confirm flow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with no output schema, the description covers the core flow (preview then write) but omits details on several optional parameters (overwrite, description) and doesn't specify the return format beyond 'diff'. Given the complexity and lack of annotations, more explanation would help, but the essential behavior is captured.

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

Parameters2/5

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

Schema description coverage is only 33%, and the description adds little beyond that. It mentions 'confirm: true' in the invocation flow, but does not explain 'name', 'flowId', 'overwrite', or 'description'. The workspace param has a schema description, but the tool description does not elaborate on these parameters, failing to compensate for the low coverage.

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 clearly states a specific verb ('Create') and resource ('trigger/<name>.trigger.mcs.yml'), plus the purpose (pointing at a cloud flow that starts the agent via WorkflowExternalTrigger). This distinguishes it from other 'add' tools like cs_add_flow or cs_add_tool, which deal with different artifact types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly indicates this tool is for adding an event trigger, but does not explicitly state when to use it over alternatives or when not to use it. There's no mention of sibling tools or conditions for selection. The two-call pattern is explained, but that's more about invocation than choosing this tool.

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