add_counter
Animate a number from one value to another using a keyframed Slider and source-text expression, with optional decimals, thousands separators, prefix, suffix, and easing on an existing or newly created text layer.
Instructions
Number counter driven A→B by a keyframed Slider control feeding a source-text expression — the responsive-counter primitive. Target an existing text layer, or pass create:true (+ optional position, fontSize, name) to make a new one. A slider (named by sliderName, default "Counter") is keyframed from→to across over [startSec,endSec], with optional ease. The source-text expression (built WITHOUT toFixed) applies decimals, optional thousands separators (separator char, default ","), prefix, and suffix. Returns { layer, slider, from, to, over, expression, expressionError }.
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": {
"over": "<over>"
},
"name": "add_counter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Slider end value. | |
| comp | No | Comp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp. | |
| ease | No | Easing for the slider keyframes (influence 75). | |
| from | No | Slider start value. | |
| name | No | Name for a created layer. | |
| over | Yes | [startSec, endSec] keyframe times. | |
| layer | No | Layer: name (string), 1-based index (integer), or { id: N } for duplicate-name-safe stable-id addressing. | |
| create | No | Create a new text layer instead of targeting `layer`. | |
| prefix | No | Text before the number (e.g. "$"). | |
| suffix | No | Text after the number (e.g. "%"). | |
| decimals | No | Decimal places. | |
| fontSize | No | Font size for a created layer. | |
| instance | No | Target a specific AE when more than one is connected (e.g. "2026", "2025", or a major like "26"). Omit when only one AE is open — see list_instances. | |
| position | No | Position for a created layer. | |
| separator | No | Thousands separator character. | , |
| thousands | No | Insert thousands separators. | |
| sliderName | No | Name of the Slider control. | Counter |