indesign-mcp-layout
Skill41 starsChanged 4 months agoMITView on GitHub
Use when driving Adobe InDesign through this MCP server. Prefer the typed tools; read before using export_executeScript or script_run.
In this repositoryOne other file it gives its agents.
- llms.txtllms.txt
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Confirm the target document: before mutating. Call document_getState first, then pass the document's name (or its activeDocumentIndex) as …
- Very specific: line 48
Prefer text_getContent / grep_find to read state before writing it.
- Very specific: line 61
Use document_listOpen when you want the answer through a tool call.
- Very specific: line 65
Read before you write. text_getContent returns frame contents, and text_getFormatting returns the per-range font, size and character style …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
InDesign Layout Through MCP
This server exposes typed tools with bare snake_case names — document_create,
text_addFrame, table_setCell and 194 more. They validate their arguments,
wrap ExtendScript internally and apply timeouts and error handling.
Use the typed tools. Raw script execution is a last resort.
Why typed tools instead of raw ExtendScript
export_executeScript / script_run push code straight to the InDesign
bridge. There is no cancellation: if a script hangs inside InDesign, the
host process stays busy and every later tool call queues behind it until the
host is restarted. Never use raw scripts for loops, font enumeration,
multi-mutation probes, or anything that touches many DOM objects.
| Instead of raw ExtendScript | Use |
| Read document info | document_getInfo |
| Enumerate fonts | font_list (per-frame details: text_getFormatting) |
| Create a document | document_create |
| Add pages | page_add |
| Create a text frame | text_addFrame |
| Create shapes | shape_rectangle_create / shape_ellipse_create / shape_polygon_create |
| Create colors | color_swatch_create |
| Build or edit tables | table_create / table_setCell / table_setRowColumnSize |
| Search and replace text | grep_replace / text_findReplace |
| Create styles | style_createParagraph / style_createCharacter |
| Apply styles to text | text_applyParagraphStyle / text_applyFont |
| Read text content | text_getContent / text_getFormatting |
| Export | export_document |
| Check the connection | document_listOpen — or read the mcp://bridge/status resource |
Before any layout task
- InDesign must be open and visible. With no open document the calls fail, and on the Windows COM bridge a non-visible instance leaves the user looking at an empty application.
- Confirm the target document before mutating. Call
document_getStatefirst, then pass the document's name (or itsactiveDocumentIndex) asdocument_idon the calls that follow — every tool accepts it. With nodocument_ida tool acts on the front document, so with more than one document open the wrong front tab is a common failure. - Prefer
text_getContent/grep_findto read state before writing it.
Resources
Besides the tools, the server exposes read-only resources for cheap checks. They never touch InDesign and cost no round-trip, so they are the right way to answer "is this thing alive?":
mcp://bridge/status— is the bridge reachable, and how deep is the queuemcp://session/status— this session's statemcp://document/active— the front document's cached statemcp://tools/inventory— the full tool list, for discovery
Use document_listOpen when you want the answer through a tool call.
Reading state
Read before you write. text_getContent returns frame contents, and
text_getFormatting returns the per-range font, size and character style —
enough to decide what to change without executing a probe script.
Windows / COM notes
The Windows bridge talks to InDesign over COM, which differs from the macOS UXP/JXA path in a few places worth knowing:
- Dialogs must not appear. Scripts run with
app.scriptPreferences.userInteractionLevelset toNEVER_INTERACT, so export and font dialogs cannot block on Windows. - Some font properties throw. In raw ExtendScript,
fontFamily,italicandweightare not supported and raise an error. UseappliedFont, which returns"Family\tStyle", plusfontStyle. Variable fonts are reported as tab-separated names such as"Fraunces\tMedium". - Enums are read-only.
ColorModelmembers areColorModel.PROCESS(and friends); assigning to them throws "ColorModel is read only". Read the enum value instead of assigning it.
Geometry gotchas
- Bounds are
[top, left, bottom, right], and they must be well formed: an inverted or degenerate rectangle throws. - InDesign 2026 rejects re-anchoring an object with
move()when the target is an insertion point. The typed anchored-object tools add the object to the insertion point's own collection instead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

