Delete a global variable
delete_variableDelete a variable from the project. Blocks deletion if the variable is referenced in scripts; use force to override, which may cause compile errors.
Instructions
Remove a Variable entry from project/variables.gbsres. Refuses if any script references the variable (e.g. VARIABLE_SET_TO_VALUE / IF_VARIABLE_VALUE; ScriptValue {type:"variable", value:<id>}). Pass force: true to override — but expect compile errors on the next build_rom unless every reference is repaired.
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": {
"variableId": "<variableId>"
},
"name": "delete_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Skip the cross-reference check. | |
| variableId | Yes | Variable id (string) to delete. |