km_add_if_variable_contains
Add an If-Then-Else action that checks if a variable contains a specified value, then executes custom actions for true or false conditions in your macro.
Instructions
Add an If-Then-Else action that checks if a variable contains a value.
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>",
"containsValue": "<containsValue>"
},
"name": "km_add_if_variable_contains"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variable | Yes | Variable name to check | |
| containsValue | Yes | Value to check if variable contains | |
| elseActionsXml | No | Optional: XML actions for false condition. Same format as thenActionsXml. | |
| thenActionsXml | No | Optional: XML actions for true condition. Pass one or more <dict>...</dict> elements concatenated (they get wrapped in <array>). Example: <dict><key>MacroActionType</key><string>Notification</string><key>Title</key><string>Hi</string><key>Text</key><string>Msg</string></dict> | |
| macroIdentifier | Yes | Macro name or UID |