Skip to main content
Glama
grandMA2 MCP
by drohi-r

manage_variable

Set, add to, or list global or user-scoped console variables so macros and command-line expressions can reference named values.

Instructions

Set, add to, or list console variables (global or user-scoped).

Variables are named values stored on the console that can be used in
macros and command line expressions. The $ prefix is automatically
added to var_name if not already present.

Args:
    action: "set" to assign a value, "add" to increment, "list" to show all variables
    scope: "global" for system variables, "user" for user-scoped variables
    var_name: Variable name (e.g. "myvar" or "$myvar" — $ auto-added)
    value: Value to set or add. Required for "add", optional for "set",
        ignored for "list"
    input_dialog: If True with action="set", shows an input dialog
        on the console for the user to enter a value

Returns:
    str: JSON with command_sent and raw_response.

Examples:
    - Set global var: action="set", scope="global", var_name="myvar", value=42
    - Set user var: action="set", scope="user", var_name="speed", value=100
    - Add to global: action="add", scope="global", var_name="counter", value=1
    - List global vars: action="list", scope="global"
    - List user vars: action="list", scope="user"

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "scope": "<scope>",
      "var_name": "<var_name>"
    },
    "name": "manage_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeYes
valueNo
actionYes
var_nameYes
input_dialogNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It usefully discloses two non-obvious behaviors: the $ prefix is auto-added to var_name, and input_dialog triggers an interactive dialog on the console when action='set'. It does not cover what happens if a variable does not yet exist during 'add', whether scope mixing is an error, or any permission requirements for global vs user scope.

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 purpose is front-loaded in the first line, followed by brief conceptual context, then labeled Args/Returns/Examples sections that are easy to scan. The five examples are somewhat redundant with the Args section, and the Returns block partly duplicates the output schema, so a little trimming is possible.

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?

For a five-parameter mutation tool with no annotations, the description covers actions, scoping, naming conventions, the interactive dialog flag, and return shape. An output schema already exists, so the Returns note is a bonus rather than a necessity, and what remains missing is mostly edge-case behavior rather than information required to invoke it.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does: all five parameters are described with meaning, per-action conditional requirements, and the accepted values for action and scope. The remaining gap is value typing – it never says whether 'add' works on string variables or requires numeric values, and the anyOf int/number/string/null type is left unexplained.

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 opening sentence names specific verbs (set, add, list) against a specific resource (console variables) and states the global/user scope axis. It is clear what the tool does, though it never mentions the sibling get_variable, so the agent must infer the read-single-value alternative on its own.

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 action and scope parameters are enumerated with what each means ('set' to assign, 'add' to increment, 'list' to show all), and the value parameter's required/optional/ignored status per action is spelled out. However, there is no explicit when-not guidance, such as pointing to get_variable for retrieving one variable's value instead of listing all.

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