Skip to main content
Glama
lazyq666

Illustrator MCP Unified

by lazyq666

replace_masked_image

Destructive

Replace a named raster image inside its existing clipping mask while preserving the rectangle and stacking order; choose linked or embedded. Rejects rotated, mirrored, or aspect-mismatched images.

Instructions

Replace a named raster inside its existing clipping group while preserving the image rectangle and stacking. Explicitly choose linked or embedded. Rejects rotated/sheared/mirrored images and aspect mismatches before replacement; use a template-specific script for them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
embedYes
file_pathYes
item_nameYes
document_pathYes
root_layer_pathYes
require_clippingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0-local.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, so the mutation profile is already covered; the description adds real value on top by disclosing what is preserved (image rectangle, stacking), the linked-vs-embedded decision, and pre-replacement validation that rejects rotated/sheared/mirrored or aspect-mismatched inputs. It stops short of saying what happens to the original raster data or whether the operation is reversible.

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?

Three sentences, front-loaded with the core action, then the linked/embedded choice, then the rejection rules. Dense but every clause carries information; no filler. Slightly compressed phrasing ('use a template-specific script for them') costs a little clarity.

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 6-parameter destructive mutation with no output schema, the description covers the action, the preservation semantics, the input-mode choice, and the validation gates. What is missing is the meaning of document_path/root_layer_path and any note on failure behavior, but the core is adequate.

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 0% across 6 parameters, so the description carries the full burden. It supplies meaning for item_name ('named raster'), embed ('explicitly choose linked or embedded'), require_clipping (implicitly via 'inside its existing clipping group') and file_path, but document_path and root_layer_path — the required path parameters — are never explained. Partial compensation only.

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?

States a specific verb (replace) and a precise resource (a named raster inside its existing clipping group), and adds the constraint that the image rectangle and stacking are preserved. This distinguishes it from siblings like place_image and manage_linked_images, which create or manage rather than swap in place.

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

Usage Guidelines4/5

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

Provides explicit exclusions (rotated/sheared/mirrored images, aspect mismatches) and routes those cases to 'a template-specific script', which is genuine when-not guidance. It does not, however, contrast with nearby siblings such as place_image or manage_linked_images, so the agent must infer when this tool is preferred over them.

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