Skip to main content
Glama
dha-aa
by dha-aa

Set Expression

set_expression
DestructiveIdempotent

Set or clear an expression on one property or many layers in After Effects, and return whether the syntax was accepted.

Instructions

Set an expression on a property (empty string clears it), on one layer or the same property of many (layer_ids: send a shared expression once). Returns whether After Effects accepted the syntax.

Input Schema

NameRequiredDescriptionDefault
pathYes
layer_idNo
layer_idsNoSame comp
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.22.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=true. The description adds real value on top: an empty string clears the expression (the concrete destructive behavior) and that it returns whether AE accepted the syntax. It stops short of stating auth/connection requirements or what happens on rejection.

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

Conciseness5/5

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

One dense sentence with the primary action first, parenthetical clarifications for the two non-obvious behaviors, and no filler. Every clause adds operational information.

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

Completeness3/5

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

With no output schema, the description usefully states the return value ('whether After Effects accepted the syntax'). But for a 4-parameter mutation tool with 25% schema coverage, the unexplained 'path' parameter and the absence of any environment/permission prerequisite leave it short of complete.

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

Parameters3/5

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

Schema coverage is only 25%, so the description must carry more weight. It does explain layer_id vs layer_ids semantics ('send a shared expression once') and the empty-string behavior of expression, but it never explains the required 'path' parameter, which accepts either a string or an array of strings/numbers — the biggest ambiguity in the schema.

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?

States a specific verb (set) and resource (an expression on a property), plus the multi-layer scope, which separates it from set_property. It doesn't name the sibling tool explicitly, so an agent must infer the boundary rather than being told.

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?

Provides some usage guidance for the batch path (layer_ids = same property on many layers, shared expression sent once), which implies when to pick it over layer_id. However, there is no when-to-use vs set_property, no prerequisite about an active After Effects connection, and no note on failure behavior.

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