Skip to main content
Glama
Bieuulls

Illustrator AI & MCP Control

by Bieuulls

illustrator_query_items

Read-onlyIdempotent

Query Illustrator items by selection, layer, type, name pattern, or location, returning item references and handles for targeted follow-up edits.

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

EXAMPLES: Require exactly one matching text label: { "params": { "targets": { "type": "query", "contents": "alpha-helix", "expect": { "count": 1 } } } } Every path whose name starts with axis_: {"params": {"targets": {"type": "query", "itemType": "PathItem", "pattern": "axis_*"}}} Everything on a named layer: {"params": {"targets": {"type": "layer", "layer": "Layer 1"}}}

NOTES:

  • Returns ItemRef plus an expiring handle for exact untagged follow-up edits

  • Handle issuance never writes item.note or item.name

  • Set include_trace=True for debugging

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=false. The description adds valuable behavioral context beyond annotations: it states the contract explicitly, explains that handle issuance never writes item.note or item.name, and notes that handles are expiring. It also mentions include_trace for debugging. The only minor gap is not detailing failure modes or return structure, but the description adds meaningful behavioral disclosure beyond the annotations.

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?

The description is well-structured with clear sections (CONTRACT, WHEN TO USE, TARGET SELECTORS, EXAMPLES, NOTES) and front-loads the core purpose. It is longer than minimal but every section earns its place by providing actionable guidance. The examples are compact and illustrative. Slight redundancy exists between the CONTRACT line and annotations, but this is acceptable for emphasis.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a query tool with a complex nested schema, the description covers the key aspects: what it does, when to use it, how to construct targets, and important behavioral notes (handles, no writes). The schema itself is extremely detailed with descriptions for each target type, so the description doesn't need to repeat those. The description is complete enough for an agent to select and invoke the tool correctly, though it could mention the return format or error behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the top-level params, but the description compensates substantially. It explains the targets parameter with concrete selector examples ({type: 'selection'}, {type: 'layer', layer: 'Layer 1'}, {type: 'all', recursive: true}, {type: 'query', itemType: 'PathItem', pattern: 'axis_*'}) and provides full JSON examples. It also explains the include_trace and handle behavior. The description adds meaning beyond the raw schema, though the schema itself is rich with descriptions for nested types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Query items using the Task Protocol with declarative target selection.' It clearly distinguishes this from siblings like illustrator_execute_script or illustrator_execute_task by focusing on read-only querying with declarative targets. The WHEN TO USE section reinforces the purpose with concrete use cases (finding items, inspecting selection, listing items).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an explicit WHEN TO USE section listing three concrete scenarios, and the CONTRACT line states readOnly=True, destructive=False, idempotent=True, openWorld=False, which tells the agent when this tool is safe to use. It also implicitly distinguishes from mutation tools by emphasizing 'before modification' and 'inspecting'. The examples further clarify usage patterns.

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