get_custom_variable_usage
List every campaign whose sequence references a custom variable, so you can see what a delete would affect BEFORE attempting it rather than discovering it from a 409 you then have to unpick. Call this first whenever the user asks to delete or clean up a variable. Returns live and drafts separately, and the difference matters: a draft can still be edited before it ever sends, while a live campaign would start losing the phrase from messages already going out. A non-empty live list is exactly what makes delete_custom_variable return 409 variable_in_use, so read it to decide between editing those sequences or passing replace_with. Both lists are always arrays. Read-only. Pass include_coverage=true to also learn how many leads and prospects actually have a value for the variable (response { usage, coverage }). Low coverage means most messages using it will fall back to fallbackBody or its default, so check before launching a sequence that depends on it.
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": {
"custom_variable_id": "<custom_variable_id>"
},
"name": "get_custom_variable_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_coverage | No | true = also return how many leads and prospects have a value for the variable. | |
| custom_variable_id | Yes | Variable id, from list_custom_variables. |