Skip to main content
Glama

Add a global variable

cs_add_variable

Create a conversation-scoped global variable file for Copilot Studio agents, previewing the diff first. Call again with confirm: true to write it.

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.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

A3.9/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 well: it discloses that the first call mutates nothing, returns a diff against current state, and requires an explicit confirm to commit. It omits behavior around overwrite (what happens to an existing variable), error conditions, and auth requirements, so it is strong but 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.

Conciseness4/5

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

Two dense sentences that front-load the artifact created and immediately explain the two-phase confirm mechanic. No filler, though the preview/confirm detail is partially repeated by the schema's confirm description.

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 mutation tool with no annotations and no output schema, the description covers the critical safety mechanism (preview-then-confirm) but leaves the majority of parameters and the overwrite semantics unexplained. Adequate for the happy path, incomplete for full correct invocation.

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 29%, so the description is expected to compensate for undocumented parameters. It only reinforces 'confirm' (which the schema already documents) and says nothing about name, overwrite, description, aiVisibility, or defaultValue, leaving most parameters without meaning beyond their names.

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) and resource (global variable) and goes further by naming the exact artifact produced (variables/<name>.variable.mcs.yml, GlobalVariableComponent, conversation scope). This is unambiguous and clearly distinct from sibling 'add_*' tools like cs_add_topic, cs_add_tool, or cs_add_flow.

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?

The description gives concrete procedural guidance: the first call is a preview, and you must call again with the same arguments plus confirm:true to actually write. That is clear when/how-to-use context. It does not name alternatives or state exclusions (e.g., when to use this vs. editing an existing variable), which keeps it below 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