Skip to main content
Glama

set_expression

Sets or clears an expression on an After Effects property, returning any expression error AE reports.

Instructions

Set (or clear with '') an expression on a property. Returns any expression error AE reports.

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>",
      "property": "<property>",
      "expression": "<expression>"
    },
    "name": "set_expression"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNo
layerYes
propertyYes
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses that an empty string clears the expression and that expression errors reported by AE are returned, but it does not describe mutation side effects such as overwriting an existing expression, persistence, permissions, or error handling beyond the returned message.

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?

The description is two short sentences and front-loads the core operation. The parenthetical clearing syntax is efficient and no wording is unnecessary.

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

Completeness2/5

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

This is a mutation tool with four parameters, no annotations, no output schema, and no schema descriptions, but the description omits key context such as comp/layer semantics, side effects, and return details beyond expression errors. It is not complete enough for confident invocation without inspecting the schema.

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

Parameters2/5

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

Schema description coverage is 0% for four parameters, and the description only clarifies the expression parameter's empty-string clearing behavior and that the target is a property. It leaves the layer and comp parameters, their relationship, and their accepted types unexplained, so it does not compensate for the schema gap.

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, "Set", and a specific resource, "an expression on a property", and also clarifies that an empty string clears it. It does not explicitly distinguish this from siblings like set_property or eval_jsx, but the resource is clear enough to identify the operation.

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

Usage Guidelines2/5

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

The description explains the clearing behavior with an empty string, but it gives no guidance on when to use this tool instead of set_property, eval_jsx, or other siblings. There are no prerequisites, exclusions, or contextual usage rules beyond the basic operation.

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