Skip to main content
Glama

Add an event trigger

cs_add_trigger

Generate a trigger file that links a Copilot Studio agent to a cloud flow. Review the preview diff, then confirm to write the YAML.

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.8
    • removedInput schema / additionalProperties
      Removed value: -false
  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.1/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 disclose the key non-obvious behavior: the first call is a no-op that returns a diff for approval, and nothing is written without confirm: true. It omits overwrite semantics, error/permission behavior, and what the second call returns, keeping it below a 5.

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?

Three tight sentences, front-loaded with what gets created before explaining the preview/confirm protocol. No wasted filler. Slightly dense but every clause contributes.

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?

No output schema and no annotations, so the description must cover behavior and returns. It correctly explains the first-call preview return (the diff) and the approval workflow, but does not describe the second-call result, failure modes, or overwrite interaction.

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 coverage is only 33% (only confirm and workspace are documented), so the description must compensate. It adds real meaning for confirm (gates the write) and implies name is used to build the file path, but flowId, overwrite, and description get no explanation in either place. Partial compensation merits a 3.

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 (Create) plus the exact artifact produced (trigger/<name>.trigger.mcs.yml) and the semantic role of that artifact (points at a cloud flow that starts the agent via WorkflowExternalTrigger). An agent can distinguish this from flow/topic/tool creation siblings without opening the schema.

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?

Explicitly describes the two-step flow: first call previews, second call with the same arguments plus confirm: true writes. This tells the agent when to call it and when to call it again. It doesn't name a sibling alternative or state prerequisites (e.g., flow must already exist), so it falls short of 5.

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