Skip to main content
Glama

add_expression_control

Adds a slider/checkbox/color/point/angle/layer expression control to a layer, optionally sets its value, and auto-links target property expressions for rigging.

Instructions

Add an expression control effect (Slider / Checkbox / Color / Point / 3D Point / Angle / Layer) to a layer — the backbone of a rig. Optionally rename it (name — this also becomes the effect("...") accessor name), set its initial value (value), and AUTO-LINK it: pass linkTo {layer, prop} to point that property's expression at this control. The link is force-evaluated and its expressionError is returned inline (empty string = it evaluated cleanly). The link target must be in the same comp as the control for it to resolve. Returns { effectName, type, valueStream, valueSet, linkedTo, expression, expressionError, linkEnabled }.

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": {
      "layer": "<layer>",
      "type": "<type>"
    },
    "name": "add_expression_control"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp.
nameNoRename the control effect. Also becomes the name used in the auto-link accessor (effect("<name>")).
typeYesWhich control effect to add.
layerYesLayer: name (string), 1-based index (integer), or { id: N } for duplicate-name-safe stable-id addressing.
valueNoInitial value for the control's value stream: number (slider/angle), 0|1 or boolean (checkbox), [r,g,b,a] 0..1 (color), [x,y] (point), [x,y,z] (point3d), 1-based layer index (layer).
linkToNoOptional. Target property whose expression will be set to reference this control. Must be in the same comp as the control.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it explains that linkTo force-evaluates the target expression and returns expressionError inline, with an empty string meaning clean evaluation. It also states the same-comp requirement and lists return fields, though it does not discuss reversibility, permissions, or failure modes beyond expressionError.

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?

The description is front-loaded with purpose and then packs the important optional behaviors and return shape into a single dense paragraph. Every part is relevant, but the long semicolon-heavy sentence could be easier to scan if broken into shorter structured statements.

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 complex 7-parameter tool with nested linkTo, no annotations, and no output schema, the description is fairly complete: it covers the core mutation, optional auto-linking, same-comp restriction, expressionError semantics, and return fields. The main remaining gap is guidance about alternatives and broader side effects.

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, but the description adds meaning beyond the schema by explaining that the name becomes the effect("...") accessor and that linkTo auto-links and evaluates the target expression. It reinforces value as initial control value but does not add much to comp or instance beyond what the schema already states.

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

Purpose4/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: adding an expression control effect of listed types to a layer, positioned as rig-building. It is clearly distinct from expression-editing siblings, but it does not explicitly route the agent away from alternatives such as apply_expression_preset or set_expression.

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

Usage Guidelines3/5

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

Usage is implied through the rigging framing, optional rename/value setup, and the auto-link capability. The same-comp constraint for linkTo is a useful condition, but the description does not explicitly say when to choose this tool over adjacent expression tools or when not to use it.

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