Skip to main content
Glama

layer_create

Creates a new vector, bone, group, switch, particle, text, or other layer directly inside a live Moho project, with optional parent, naming, and initial frame settings.

Instructions

Create a new layer live inside Moho (vector, image, bone, group, switch, framebyframe, particle, patch, text, note, audio). For framebyframe, auto-creates an initial child vector frame unless createInitialFrame=false.

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

Input Schema

NameRequiredDescriptionDefault
nameNo
typeYes
editOnlyNo
noteTextNoText content when type='note'
insertAtTopNo
sourceImageNoImage file path when type='image'
parentLayerIdNo
parentLayerNameNo
initialFrameNameNoFor type='framebyframe': initial child vector layer name (default: 'Frame 1')
createInitialFrameNoFor type='framebyframe': auto-create initial vector child layer (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. It does disclose one non-obvious behavior — framebyframe auto-creates an initial child vector frame unless createInitialFrame=false — which is real value, but it says nothing about whether the new layer becomes selected/active, whether the operation is undoable, or what happens with parentLayerId vs parentLayerName conflicts.

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?

Two tight sentences, both front-loaded: the capability and its type scope first, then the one special-case behavior. Nothing is redundant.

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 10-parameter mutation tool with no annotations and no output schema, the definition covers the required parameter and the framebyframe special case but omits the return value (new layer ID or object?), the parent-scoping rule, and the meaning of insertAtTop/editOnly. It is adequate to invoke correctly on the happy path but not 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 40%, so the description should compensate more. It usefully explains the type enum and the framebyframe/initialFrame interaction, matching the two schema-described params, but leaves parentLayerId, parentLayerName, insertAtTop, editOnly, and name completely unexplained.

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?

"Create a new layer live inside Moho" names a specific verb and resource, and the parenthetical enumerates every supported layer type, so an agent can match a requested layer kind to this tool. It does not explicitly contrast with close siblings such as layer_groupSelection or layer_convertType, so it falls short of 5.

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?

There is no when-to-use or when-not guidance: nothing says to prefer layer_groupSelection for grouping existing layers or layer_convertType when changing an existing layer's type. The type enum implies the creation context but the agent must infer alternatives on its own.

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