Skip to main content
Glama
gherardo200-glitch

illustrator-mcp

Run ExtendScript

illustrator_run_script
Destructive

Execute custom ExtendScript in Adobe Illustrator for tasks not covered by specialized tools. Use return to send JSON data back.

Instructions

Execute arbitrary ExtendScript (Illustrator's JavaScript) in the active Illustrator instance. Use this for anything the specialized tools do not cover — advanced paths, effects, batch edits, reading detailed properties, etc.

The code runs inside a function body: use return <value> to send JSON-serializable data back. The global app and the active document are available, plus helpers: __doc(), __color(hex), __setPos(item, x, y), __itemInfo(item), __abRect(), __activeAB(doc), __style(item, opts).

Coordinates in Illustrator's native API are Y-up and global; the helpers convert to artboard-relative Y-down.

Example code: var d = __doc(); var r = d.pathItems.rectangle(0, 0, 100, 100); return __itemInfo(r);

NOTE: This can modify or delete artwork and interact with the file system. Prefer the specialized tools when they fit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesExtendScript source to run. Use `return <value>;` to return JSON-serializable data.
Behavior4/5

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

Annotations already indicate destructiveHint: true and readOnlyHint: false. The description adds context: 'This can modify or delete artwork and interact with the file system.' Also explains helper functions and coordinate system. No contradiction with annotations.

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?

Concise single paragraph. Front-loaded with purpose and usage, followed by technical details. Every sentence adds value. No wasted words.

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

Completeness5/5

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

For a generic script execution tool with one parameter and no output schema, the description fully explains how to use it: code body, return values, available globals, helpers, coordinate system, and example. Complete context for correct invocation.

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 coverage is 100%, so baseline is 3. The description repeats schema info and adds examples and helper details, but does not significantly extend meaning beyond what the schema provides.

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?

Clearly states it executes arbitrary ExtendScript in the active Illustrator instance. Uses specific verb 'Execute' and resource 'ExtendScript'. Explicitly differentiates from sibling tools by saying 'use this for anything the specialized tools do not cover'.

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?

Provides explicit when-to-use guidance: advanced paths, effects, batch edits, etc. Also tells when not to use: 'Prefer the specialized tools when they fit.' Includes example and notes on return values and code structure.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gherardo200-glitch/illustrator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server