Skip to main content
Glama

Add a global variable

cs_add_variable

Add a conversation-scoped variable to a Copilot Studio agent by creating its YAML definition file. Set the name, default value, and optional visibility.

Instructions

Create variables/.variable.mcs.yml (GlobalVariableComponent, conversation scope).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
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. First observedv0.1.5

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses the file creation and component type, but does not mention whether overwrite behavior is default, what happens if the file exists, whether the variable is immediately available, or any side effects. The 'overwrite' parameter hints at behavior but the description itself doesn't explain it.

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?

The description is a single sentence that is concise and front-loads the key action and resource. It earns its place by specifying the exact file path and component type, though it could add a bit more context without becoming verbose.

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

Completeness2/5

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

With 6 parameters, no output schema, and no annotations, the description is too sparse. It doesn't explain the meaning of key parameters like 'overwrite' and 'aiVisibility', doesn't describe return values or success/failure behavior, and doesn't clarify the workspace context. An agent would need to infer too much to use this tool correctly.

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 17%, so the description must compensate, but it only explains the 'name' parameter via the file path template. The 'overwrite', 'workspace', 'description', 'aiVisibility', and 'defaultValue' parameters are not explained in the description, and the schema provides minimal descriptions for them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Create') and resource ('variables/<name>.variable.mcs.yml') and identifies the component type (GlobalVariableComponent) and scope (conversation). It is clear what the tool does, though it doesn't explicitly distinguish it from sibling tools like cs_add_topic or cs_add_tool beyond the resource type.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, no prerequisites, and no context about when a global variable should be created this way. The file path implies it operates within a workspace, but no explicit usage conditions are stated.

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