illustrator_query_items
Find and inspect Illustrator items by type, name pattern, layer, or selection before modifying them. Returns stable references to matched items for reliable follow-up actions.
Instructions
Query items using the Task Protocol with declarative target selection.
CONTRACT: readOnly=True, destructive=False, idempotent=True, openWorld=False
WHEN TO USE:
Finding items by type, name pattern, or location before modification
Inspecting current selection
Listing all items on a layer or in the document
TARGET SELECTORS: {type: "selection"} — current selection (default) {type: "layer", layer: "Layer 1"} — all items on layer {type: "all", recursive: true} — all items in document {type: "query", itemType: "PathItem", pattern: "axis_*"} — filter by type/name
NOTES:
Returns ItemRef for each matched item, enabling stable references
Set include_trace=True for debugging
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |