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
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | ||
| value | No | ||
| action | Yes | ||
| var_name | Yes | ||
| input_dialog | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |