km_add_calculation
Add a calculation action to a macro to set a variable to the result of an expression, like incrementing a counter or computing totals.
Instructions
Add an action to set a variable to the result of a calculation (e.g., "Counter + 1").
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": {
"macroIdentifier": "<macroIdentifier>",
"variable": "<variable>",
"expression": "<expression>"
},
"name": "km_add_calculation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variable | Yes | Variable name to set | |
| expression | Yes | Calculation expression (e.g., "Counter + 1", "Price * Quantity") | |
| macroIdentifier | Yes | Macro name or UID |