illustrator_set_reference
Set or replace a dimmed reference image on a locked background layer for tracing, or clear an existing reference. Use it to prepare a stable overlay before manual or automated tracing.
Instructions
Set or clear a reference image on a locked background layer for tracing.
CONTRACT: readOnly=False, destructive=True, idempotent=True, openWorld=True
WHEN TO USE:
Preparing a reference image overlay before manual or automated tracing
Clearing a previous reference (action="clear")
KEY CONCEPTS: Places image on a dedicated 'reference' layer at the bottom of the stack. Layer is locked, dimmed, and non-printable to prevent accidental edits. Calling again with the same file replaces the previous reference (idempotent).
EXAMPLES: Set a dimmed tracing reference: {"params": {"action": "set", "file_path": "C:/ref/sketch.png", "opacity": 50}} Legacy set (still accepted): {"params": {"file_path": "C:/ref/sketch.png"}} Clear the reference layer: {"params": {"action": "clear"}}
NOTES:
Clear deletes the reference layer; omit file_path, opacity and fit
Empty calls now reject; migrate old empty clears to action="clear"
Legacy nonempty file_path without action still means set
Uses the active artboard for fit/center calculations
Extracts dominant colors from reference image if Pillow is available
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |