illustrator_execute_task
Execute structured Illustrator tasks to create or modify elements, batch shapes, and target items with selectors, dry-run previews, and error reports.
Instructions
Execute a structured task using the Task Protocol v2.1.
CONTRACT: readOnly=False, destructive=True, idempotent=False, openWorld=False
WHEN TO USE:
Creating/modifying elements with declarative ops (element_create, style_set, etc.)
Batch element creation (element_create_batch)
Any operation that benefits from structured error reports and target selectors
EXAMPLES: Smooth curve: illustrator_execute_task(payload={task: "element_create", params: { type: "path", points: [[0,50],[50,0],[100,50],[150,0]], smooth: true, tension: 0.5, fill: {r: 0, g: 150, b: 136}}}) Batch shapes: illustrator_execute_task(payload={task: "element_create_batch", params: { template: {type: "ellipse", rx: 4, ry: 3}, array: {count: 47, startX: 180, spacingX: 15}}}) Grid layout: illustrator_execute_task(payload={task: "element_create_batch", params: { template: {type: "rect", w: 8, h: 8}, array: {count: 50, cols: 10, spacingX: 15, spacingY: 15}}})
TARGET SELECTORS: {type: "selection"} — current selection (default) {type: "layer", layer: "Layer 1"} — all items on layer {type: "query", itemType: "PathItem", pattern: "axis_*"} — pattern match {type: "all", recursive: true} — all items in document {type: "id", ids: ["A1", "A2"]} — stable MCP ID targeting
OPTIONS: dryRun: true — compute actions without applying trace: true — include execution trace in report assignIds: true — write unique IDs to item.note (opt-in)
NOTES:
All task+params must be wrapped in a 'payload' field
For boolean ops use illustrator_path_boolean, not execute_task
For raw SVG path data use illustrator_path_import_svg
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |