Skip to main content
Glama
lazyq666

Illustrator MCP Unified

by lazyq666

Replace Color

replace_color
Destructive

Replace colors across an entire document or within a specific layer by matching from_color and applying to_color, with tolerance and fill/stroke targeting. Note that from_color and to_color must share the same color type.

Instructions

Find and replace colors across the document or within a specific layer. Limitations: SpotColor and GrayColor matching not supported. Cross-colorspace matching (e.g. RGB→CMYK) not possible — from_color and to_color must use the same color type as the target objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoLayer name to limit replacement scope (default: entire document)
targetNoWhich color attributes to replaceboth
to_colorYesReplacement color (required)
toleranceNoColor matching tolerance per channel (0 = exact match, 100 = match any)
from_colorYesColor to find (required)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0-local.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and non-idempotent behavior. The description adds important constraints beyond annotations: unsupported color types and the same-color-type requirement. It stops short of explaining what happens to existing objects or undo behavior, but the added limitations are meaningful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tightly written sentences: purpose first, then limitations. Every clause adds actionable information with no filler.

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 destructive mutation tool whose safety profile is covered by annotations, the description provides the key operational constraints. It could mention the return value or matching/replacement count, but no output schema is defined and the core invocation requirements are covered.

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 coverage is 100%, so the schema carries the parameter details. The description still adds valuable meaning by specifying that from_color and to_color must use the same color type as target objects and that cross-colorspace matching is impossible, which is not encoded in the schema.

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 states a specific verb and resource ('Find and replace colors') and qualifies the scope ('across the document or within a specific layer'). It is clearly distinguishable from color-reading siblings like get_colors and manage_swatches.

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?

It gives the scope of operation and explicitly lists conditions where the tool will not work (SpotColor/GrayColor, cross-colorspace). However, it does not name an alternative tool or say when to prefer this over other available tools, so it falls short of full routing guidance.

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