Skip to main content
Glama

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

NameRequiredDescriptionDefault
toNoSlider end value.
compNoComp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp.
easeNoEasing for the slider keyframes (influence 75).
fromNoSlider start value.
nameNoName for a created layer.
overYes[startSec, endSec] keyframe times.
layerNoLayer: name (string), 1-based index (integer), or { id: N } for duplicate-name-safe stable-id addressing.
createNoCreate a new text layer instead of targeting `layer`.
prefixNoText before the number (e.g. "$").
suffixNoText after the number (e.g. "%").
decimalsNoDecimal places.
fontSizeNoFont size for a created layer.
instanceNoTarget 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.
positionNoPosition for a created layer.
separatorNoThousands separator character.,
thousandsNoInsert thousands separators.
sliderNameNoName of the Slider control.Counter

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses the side effects (a Slider control is keyframed from→to, a source-text expression is written, a layer may be created) and enumerates the return object including `expressionError`, signaling that expression construction can fail. It omits whether an existing expression on the targeted text layer is overwritten, which is the main unstated destructive consequence.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single dense paragraph that front-loads the core mechanism before covering targeting, slider keyframing, expression formatting, and the return shape. Every sentence carries information, though the phrasing is compressed enough ('applies decimals, optional thousands separators ... prefix, and suffix') to require careful reading.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 17-parameter tool with no output schema, the description covers the return object keys, the create-vs-target paths, the active-comp default, and multi-instance targeting. What is missing is edge-case behavior: what happens if the named layer is not found, and whether an existing source-text expression is overwritten.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above it by explaining the functional relationship between parameters (the slider is keyframed `from`→`to` across `over` with optional `ease`, the expression applies `decimals`, `thousands`, `separator`, `prefix`, `suffix`) and by noting the expression is built WITHOUT toFixed, which explains numeric formatting behavior. It restates a few schema defaults (separator ',', sliderName 'Counter') rather than adding new meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: it builds a number counter driven A→B by a keyframed Slider control feeding a source-text expression, and calls it 'the responsive-counter primitive'. It also distinguishes itself from plain text creation by explaining that it either targets an existing text layer or creates one via create:true.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear operating context: target an existing text layer, or pass create:true with optional position/fontSize/name; and it notes that `instance` should be omitted when only one AE is open (pointing to list_instances). It does not state exclusions or name alternative tools (e.g. add_expression_control or add_text) for related-but-different jobs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools