Skip to main content
Glama

Add stroke

add_stroke

Adds a stroke to a shape group or Contents root, letting you set color, width, opacity, line caps/joins, miter limit and dash patterns to outline vector artwork in After Effects.

Instructions

Add a Stroke to a shape group (or Contents root): color, width, opacity, line cap/join, miter limit and dashes.

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>"
    },
    "name": "add_stroke"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
nameNoName for the stroke item.
colorNoStroke color (default white).
layerYesLayer: 1-based index, layer name, or {id}/{index}/{name}. 'selected' = first selected layer.
widthNoStroke width px (default 2).
dashesNoDash pattern [dash, gap, dash, gap, ...] in px (max 6 values).
lineCapNoStroke line cap.
opacityNoOpacity 0-100.
lineJoinNoStroke line join.
compositeNoComposite order in the group.
groupPathNoShape group path inside the layer's Contents: '/'-separated Vector Group names (or 1-based indexes), e.g. 'Logo' or 'Logo/Circle'. Omit or '' for the Contents root. A leading 'Contents/' is accepted. Use list_shape_contents to see names.
dashOffsetNoDash offset px (only with dashes).
miterLimitNoMiter limit (default 4).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the agent knows this is a local, non-destructive mutation). The description adds that the stroke is inserted into a group or Contents root, but says nothing about whether the new item is returned, where it lands in z-order by default, or what errors occur on a bad groupPath.

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?

A single front-loaded sentence with the target named before the property list; no filler. The property enumeration slightly duplicates what the schema already conveys, which keeps it short of a 5.

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 13-parameter mutation with no output schema, the description covers what is created but not what is returned, how the added item is identified afterward, or failure modes. It is adequate given the rich schema, but leaves out behavioral detail an agent would want before chaining calls.

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 description coverage is 100%, so all 13 parameters (including defaults for color/width/miterLimit, enum values, and the dashes cap) are already documented. The description only restates the property list without adding syntax, units, or interaction rules beyond the schema, so the baseline 3 applies.

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 and resource ('Add a Stroke') and names the target container ('a shape group (or Contents root)'), then enumerates the stroke properties it sets. An agent can tell this is the stroke-creation counterpart to fill/gradient siblings, though it never names those siblings explicitly.

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?

Usage is only implied: the phrase 'to a shape group (or Contents root)' hints at the required pre-existing container, and the schema's groupPath note points to list_shape_contents. There is no explicit when-to-use vs. add_fill/add_gradient_fill/add_shape_modifier guidance, and no statement of what happens if the group path does not exist.

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