Skip to main content
Glama

toggle_layer_state

Toggle or set boolean layer properties—such as enabled, solo, locked, or motion blur—on one or many After Effects layers, optionally targeting a specific comp or AE instance.

Instructions

Toggle (or set) a boolean-ish layer property in batch. prop: enabled|solo|shy|locked|threeDLayer|motionBlur|adjustmentLayer|guideLayer|collapseTransformation. If value provided, sets to that; otherwise toggles.

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": {
      "prop": "<prop>"
    },
    "name": "toggle_layer_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp.
propYes
valueNo
layersNoOne or many layers (each: name, 1-based index, or { id: N }). If omitted, uses currently selected layers.
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.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose the set-vs-toggle branching behavior. It is silent on the things that matter for a batch mutation: whether it is a write/undoable operation, what happens when one layer in the batch fails, whether locked layers can be toggled, and whether anything is returned. That is a meaningful gap for an unannotated mutator.

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?

Three compact sentences, front-loaded with the core action, then the allowed properties, then the value semantics. The only waste is the verbatim repetition of the enum already present in the schema.

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?

For a 5-parameter batch mutation with no annotations and no output schema, the definition covers the two parameters that drive behavior but says nothing about return shape, partial-failure handling, or confirmation of what changed. The comp/layers/instance parameters are documented in the schema, so the omission there is acceptable, but the behavioral gaps keep it at minimum-viable completeness.

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?

It supplies genuine meaning beyond the schema: `value` has no description in the schema, and the description defines its semantics (set vs toggle). The `prop` enumeration is repeated verbatim from the schema enum, which adds no value, but the value/set distinction is the tool's central parameter logic and it is explained clearly.

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 names a specific verb+resource ('toggle/set a boolean-ish layer property') and enumerates exactly which properties can be targeted, so an agent can tell this is a per-layer flag setter rather than a general property editor. It stops short of distinguishing itself from the nearest sibling (toggle_expression) or from generic property tools, but the scope is unambiguous.

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?

The clause 'If `value` provided, sets to that; otherwise toggles' gives real usage guidance for choosing call shape, which is the main ambiguity for this tool. However, it does not say when to prefer this over siblings like toggle_expression or batch, nor does it flag prerequisites such as an open AE instance or the fallback to currently selected layers (that fallback lives only in the schema).

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