Repository navigation
2.0.0: all 137 tools implemented and checked against the InDesign DOM
Every advertised tool is now implemented and checked against the InDesign 2023 scripting DOM.
An audit of 1.4.0 found that 17 of its 136 advertised tools were never implemented, about 40 generated scripts used properties, methods or enums that do not exist in InDesign, and failed calls were reported as successes. 2.0.0 fixes all of it and adds an audit to CI so it cannot drift again.
Verification status: every script is checked statically: it parses as ExtendScript-compatible ES5, and every property, method, enum and global it uses exists in Adobe's InDesign 2023 DOM. The scripts have not yet been run against a live InDesign in this release, and it is not yet published to npm.
Added
- 17 tools that were listed but returned "not implemented": the 11 spread tools (
list_spreads,get_spread_info,duplicate_spread,move_spread,delete_spread,set_spread_properties,create_spread_guides,place_file_on_spread,place_xml_on_spread,select_spread,get_spread_content_summary),create_layer,set_active_layer,list_layers,export_epub,detach_master_items,remove_master_override apply_character_styleis now advertised (it was implemented but missing fromtools/list)- Script audit (
npm run test:audit, part ofnpm testand CI): every advertised tool must dispatch, generate valid ES5, and use only names that exist in the InDesign 2023 DOM - Optional
pageIndexon text, shape, image and page-item tools (defaults to the active page) "#RRGGBB"colors create an RGB swatch where a color is accepteddryRunforcleanup_document; GREP search (useRegex) forfind_text_in_document;oversetOnlyforget_document_stories
Fixed
- Failed calls reported success: "No document open", "Error …" and "… not found" results now return
success: falseand MCPisError: true - Nonexistent InDesign APIs replaced with real ones, including grid, guide, text and layout preferences, slug offsets,
FitOptionsinplace_image, polygon creation, rounded corners, table header rows,resize()constraints, layout snapshots, pageadjustLayout, section numbering style, XML export, zoom, data merge and preflight validate_documentandcleanup_documentusedJSON, which InDesign's ExtendScript does not have- Enum and color arguments were spliced into scripts as bare identifiers (
BLUE,Black), which threw at runtime place_file_on_pagepassed arguments toplace()in the wrong order;export_imagesandpackage_documentread an argument the schema never defined; master spread tools readmasterIndexwhile their schemas saidnamecleanup_documentonly counted items; it now removes them.organize_document_layersdeleted a layer before reading its name and never implemented merge or sort- Case-sensitive and whole-word options in find tools were set on the wrong object and ignored
create_documentignoredpages; sizes and margins are now applied in millimeters regardless of the document's ruler unitsview_documentread properties that do not exist;indesign_statusdeleted temp scripts that running calls were still usinghelpdocumented about 30 tools (one of them nonexistent); it is now generated from the tool definitions and covers all 137- Shape tools accept omitted position and size again, as documented (automatic placement)
- Every argument that reaches a script goes through the validated
jsxSafehelpers
Changed (breaking)
set_document_preferencestakes grouped settings (general,margins,guides,text,grid) instead ofpreferenceType+preferences- Grid and layout preference parameters use InDesign's own property names
adjust_page_layouttakes numbers plusunits;resize_pagerequireswidthandheightcreate_object_style:transparencyis nowopacity(the old name is still accepted)export_imagessupports JPEG and PNG (InDesign has no TIFF or GIF export);export_pdfdrops theDIGITALoption- Removed parameters that no InDesign API could honor (for example
spreadHidden,includeImageson EPUB, severaldata_mergeoptions) create_color_swatchstores RGB by default;colorSpace: "CMYK"keeps the previous conversion