Skip to main content
Glama

run-script

Run built-in After Effects commands to create compositions, add layers, set properties, and return results. Cannot execute arbitrary code.

Instructions

Run one of the bridge's built-in After Effects commands and return its result. Only these commands exist; it cannot run arbitrary code.

Read: listCompositions, getProjectInfo, getLayerInfo (layers of the ACTIVE composition). Compositions: createComposition {name, width, height, frameRate, duration, pixelAspect, backgroundColor:{r,g,b 0-255}}; setCompositionProperties {compName, duration, frameRate, width, height}. Layers (compName = target composition; colours are [r,g,b] from 0 to 1; position is [x,y] in pixels; times in seconds):

  • createTextLayer {compName, text, position, fontSize, color, fontFamily, alignment: left|center|right, startTime, duration}

  • createShapeLayer {compName, shapeType: rectangle|ellipse|polygon|star, name, position, size:[w,h], fillColor, strokeColor, strokeWidth, points, startTime, duration}

  • createSolidLayer {compName, name, color, size:[w,h], position, isAdjustment, startTime, duration}

  • createCamera {compName, name, position:[x,y,z], pointOfInterest:[x,y,z], zoom, oneNode}

  • setLayerProperties {compName, layerName or layerIndex, position, scale:[x,y], rotation, opacity, startTime, duration, enabled, blendMode, threeDLayer, text, fontSize, fontFamily, fillColor, trackMatteType}

  • batchSetLayerProperties {compName, operations:[{layerName or layerIndex, ...same properties}]}

  • duplicateLayer {compName, layerName or layerIndex, newName}; deleteLayer {compName, layerName or layerIndex}

  • setLayerMask {compName, layerName or layerIndex, maskRect:{top,left,width,height} or maskPath, maskMode, maskFeather, maskOpacity, maskExpansion, maskName, maskIndex} Prefer the dedicated tools for keyframes, expressions and effects (they use compIndex/layerIndex). After changing anything visual, call view-comp to check the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesThe command to run
parametersNoArguments for the command, as listed in the description

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-ibintec.1

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 disclose real behavioral context: only the enumerated commands exist, units are specified (seconds, pixels, colours 0-1 for layers but 0-255 for composition background), and it flags that dedicated tools use compIndex/layerIndex instead of compName. It does not describe error behavior, reversibility, or the shape of the returned result.

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 purpose and the 'cannot run arbitrary code' caveat are front-loaded, then commands are grouped under Read / Compositions / Layers headings. It is long, but the density is justified by 19 enum values and nested parameter objects; a few inline commands on one line are slightly harder to scan.

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 high-complexity dispatcher with a nested parameters object and no output schema, the description covers usage, commands and units well. The gap is return-value behavior: 'return its result' is the only hint about what the agent gets back from each command.

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% but only nominally ('The command to run', 'Arguments... as listed in the description'), so the description is de facto the only source of parameter structure. It supplies per-command argument names plus meaningful units and ranges (times in seconds, positions in pixels, layer colours 0-1 vs composition background 0-255), which is genuine added value.

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 opening sentence gives a specific verb (run) and resource (the bridge's built-in After Effects commands) and immediately bounds it: 'it cannot run arbitrary code.' It then enumerates every command, so an agent can distinguish this dispatcher from siblings like apply-effect or setLayerKeyframe without opening the schema.

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 explicitly routes the agent away from this tool for keyframes, expressions and effects ('Prefer the dedicated tools...') and tells it to verify visual changes with view-comp. However, no guidance is given for overlapping siblings such as create-composition, which this tool can also perform via its createComposition command, so the routing is incomplete.

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