Skip to main content
Glama

Add a global variable

cs_add_variable

Add a conversation-scope variable to a Copilot Studio agent by generating the YAML definition. Review the proposed diff on the first call, then confirm to write the file.

Instructions

Create variables/.variable.mcs.yml (GlobalVariableComponent, conversation scope). 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
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
aiVisibilityNo
defaultValueNo

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

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses the most important behavior not inferable from the name: the first invocation is a no-op preview and only a confirmed second call mutates the file. It could also explain overwrite semantics, but the preview-then-confirm pattern is explicitly covered.

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?

Two dense sentences with no filler; the core action is first and the two-call confirmation protocol is explicitly front-loaded. It earns its sentences.

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?

The description makes the main invocation flow and primary side-effect clear, but with seven parameters and no output schema it leaves significant gaps (overwrite behavior, optional global-variable fields, return details). Enough for a basic call, not fully self-sufficient.

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 coverage is only 29%, and the description adds meaning only for name (via the file path) and confirm (via the workflow). The overwrite, description, aiVisibility, and defaultValue parameters remain unexplained in both schema and description, so an agent cannot reliably know their effect.

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 exactly what it creates ('variables/<name>.variable.mcs.yml (GlobalVariableComponent, conversation scope)') with a specific verb and resource. This file-targeted phrasing separates it from sibling 'add' tools such as cs_add_topic or cs_add_tool.

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?

Explains the confirm workflow clearly: first call returns a preview and changes nothing, second call with confirm: true writes. It does not explicitly contrast with alternative tools, but there is no obvious sibling for global variables and the usage context is unambiguous.

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