indesign-cli 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. cli_anything/indesign/README.md +32 -0
  2. cli_anything/indesign/__init__.py +1 -0
  3. cli_anything/indesign/__main__.py +5 -0
  4. cli_anything/indesign/core/artifacts.py +57 -0
  5. cli_anything/indesign/core/catalog.py +405 -0
  6. cli_anything/indesign/core/domains.py +178 -0
  7. cli_anything/indesign/core/envelope.py +65 -0
  8. cli_anything/indesign/core/errors.py +30 -0
  9. cli_anything/indesign/core/health.py +46 -0
  10. cli_anything/indesign/core/hidden_backend.py +116 -0
  11. cli_anything/indesign/core/hidden_handler_schemas.py +223 -0
  12. cli_anything/indesign/core/mcp_backend.py +152 -0
  13. cli_anything/indesign/core/node_setup.py +35 -0
  14. cli_anything/indesign/core/paths.py +41 -0
  15. cli_anything/indesign/core/plugins/__init__.py +2 -0
  16. cli_anything/indesign/core/plugins/backend.py +90 -0
  17. cli_anything/indesign/core/plugins/discovery.py +69 -0
  18. cli_anything/indesign/core/plugins/host_actions.py +76 -0
  19. cli_anything/indesign/core/plugins/install.py +38 -0
  20. cli_anything/indesign/core/plugins/manifest.py +279 -0
  21. cli_anything/indesign/core/plugins/validate.py +181 -0
  22. cli_anything/indesign/core/router.py +217 -0
  23. cli_anything/indesign/core/runtime.py +59 -0
  24. cli_anything/indesign/core/scripts.py +44 -0
  25. cli_anything/indesign/core/session.py +68 -0
  26. cli_anything/indesign/indesign_cli.py +320 -0
  27. cli_anything/indesign/node/hidden_handler_bridge.mjs +111 -0
  28. cli_anything/indesign/server/package-lock.json +168 -0
  29. cli_anything/indesign/server/package.json +45 -0
  30. cli_anything/indesign/server/src/advanced/index.js +76 -0
  31. cli_anything/indesign/server/src/core/InDesignMCPServer.js +273 -0
  32. cli_anything/indesign/server/src/core/scriptExecutor.js +271 -0
  33. cli_anything/indesign/server/src/core/sessionManager.js +545 -0
  34. cli_anything/indesign/server/src/handlers/advancedTemplateHandlers.js +1072 -0
  35. cli_anything/indesign/server/src/handlers/bookHandlers.js +490 -0
  36. cli_anything/indesign/server/src/handlers/documentHandlers.js +1472 -0
  37. cli_anything/indesign/server/src/handlers/exportHandlers.js +208 -0
  38. cli_anything/indesign/server/src/handlers/graphicsHandlers.js +605 -0
  39. cli_anything/indesign/server/src/handlers/groupHandlers.js +358 -0
  40. cli_anything/indesign/server/src/handlers/helpHandlers.js +347 -0
  41. cli_anything/indesign/server/src/handlers/index.js +77 -0
  42. cli_anything/indesign/server/src/handlers/layerHandlers.js +75 -0
  43. cli_anything/indesign/server/src/handlers/masterSpreadHandlers.js +451 -0
  44. cli_anything/indesign/server/src/handlers/pageHandlers.js +698 -0
  45. cli_anything/indesign/server/src/handlers/pageItemHandlers.js +704 -0
  46. cli_anything/indesign/server/src/handlers/presentationHandlers.js +220 -0
  47. cli_anything/indesign/server/src/handlers/spreadHandlers.js +348 -0
  48. cli_anything/indesign/server/src/handlers/styleHandlers.js +458 -0
  49. cli_anything/indesign/server/src/handlers/textHandlers.js +431 -0
  50. cli_anything/indesign/server/src/handlers/utilityHandlers.js +83 -0
  51. cli_anything/indesign/server/src/index.js +17 -0
  52. cli_anything/indesign/server/src/types/index.js +106 -0
  53. cli_anything/indesign/server/src/types/toolDefinitionsAdvancedTemplates.js +144 -0
  54. cli_anything/indesign/server/src/types/toolDefinitionsBook.js +224 -0
  55. cli_anything/indesign/server/src/types/toolDefinitionsContent.js +353 -0
  56. cli_anything/indesign/server/src/types/toolDefinitionsDocument.js +409 -0
  57. cli_anything/indesign/server/src/types/toolDefinitionsExport.js +65 -0
  58. cli_anything/indesign/server/src/types/toolDefinitionsLayer.js +40 -0
  59. cli_anything/indesign/server/src/types/toolDefinitionsMasterSpread.js +160 -0
  60. cli_anything/indesign/server/src/types/toolDefinitionsPage.js +271 -0
  61. cli_anything/indesign/server/src/types/toolDefinitionsPageItemGroup.js +437 -0
  62. cli_anything/indesign/server/src/types/toolDefinitionsPresentation.js +83 -0
  63. cli_anything/indesign/server/src/types/toolDefinitionsSpread.js +158 -0
  64. cli_anything/indesign/server/src/types/toolDefinitionsUtility.js +40 -0
  65. cli_anything/indesign/server/src/utils/stringUtils.js +107 -0
  66. cli_anything/indesign/skills/SKILL.md +198 -0
  67. indesign_cli-0.2.0.dist-info/METADATA +267 -0
  68. indesign_cli-0.2.0.dist-info/RECORD +72 -0
  69. indesign_cli-0.2.0.dist-info/WHEEL +5 -0
  70. indesign_cli-0.2.0.dist-info/entry_points.txt +3 -0
  71. indesign_cli-0.2.0.dist-info/licenses/LICENSE +21 -0
  72. indesign_cli-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,437 @@
1
+ /**
2
+ * PageItem and Group tool definitions
3
+ */
4
+ export const pageItemGroupToolDefinitions = [
5
+ // PageItem Management Tools
6
+ {
7
+ name: 'get_page_item_info',
8
+ description: 'Get detailed information about a specific page item',
9
+ inputSchema: {
10
+ type: 'object',
11
+ properties: {
12
+ pageIndex: {
13
+ type: 'integer',
14
+ description: 'Index of the page containing the item'
15
+ },
16
+ itemIndex: {
17
+ type: 'integer',
18
+ description: 'Index of the page item to get info for'
19
+ }
20
+ },
21
+ required: ['pageIndex', 'itemIndex']
22
+ }
23
+ },
24
+ {
25
+ name: 'select_page_item',
26
+ description: 'Select a specific page item',
27
+ inputSchema: {
28
+ type: 'object',
29
+ properties: {
30
+ pageIndex: {
31
+ type: 'integer',
32
+ description: 'Index of the page containing the item'
33
+ },
34
+ itemIndex: {
35
+ type: 'integer',
36
+ description: 'Index of the page item to select'
37
+ },
38
+ existingSelection: {
39
+ type: 'string',
40
+ enum: ['REPLACE_WITH', 'ADD_TO', 'REMOVE_FROM'],
41
+ description: 'How to handle existing selection',
42
+ default: 'REPLACE_WITH'
43
+ }
44
+ },
45
+ required: ['pageIndex', 'itemIndex']
46
+ }
47
+ },
48
+ {
49
+ name: 'move_page_item',
50
+ description: 'Move a page item to a new position',
51
+ inputSchema: {
52
+ type: 'object',
53
+ properties: {
54
+ pageIndex: {
55
+ type: 'integer',
56
+ description: 'Index of the page containing the item'
57
+ },
58
+ itemIndex: {
59
+ type: 'integer',
60
+ description: 'Index of the page item to move'
61
+ },
62
+ x: {
63
+ type: 'number',
64
+ description: 'New X coordinate'
65
+ },
66
+ y: {
67
+ type: 'number',
68
+ description: 'New Y coordinate'
69
+ }
70
+ },
71
+ required: ['pageIndex', 'itemIndex', 'x', 'y']
72
+ }
73
+ },
74
+ {
75
+ name: 'resize_page_item',
76
+ description: 'Resize a page item',
77
+ inputSchema: {
78
+ type: 'object',
79
+ properties: {
80
+ pageIndex: {
81
+ type: 'integer',
82
+ description: 'Index of the page containing the item'
83
+ },
84
+ itemIndex: {
85
+ type: 'integer',
86
+ description: 'Index of the page item to resize'
87
+ },
88
+ width: {
89
+ type: 'number',
90
+ description: 'New width'
91
+ },
92
+ height: {
93
+ type: 'number',
94
+ description: 'New height'
95
+ },
96
+ anchorPoint: {
97
+ type: 'string',
98
+ enum: ['CENTER_ANCHOR', 'TOP_LEFT_ANCHOR', 'TOP_CENTER_ANCHOR', 'TOP_RIGHT_ANCHOR', 'LEFT_CENTER_ANCHOR', 'RIGHT_CENTER_ANCHOR', 'BOTTOM_LEFT_ANCHOR', 'BOTTOM_CENTER_ANCHOR', 'BOTTOM_RIGHT_ANCHOR'],
99
+ description: 'Anchor point for resizing',
100
+ default: 'CENTER_ANCHOR'
101
+ }
102
+ },
103
+ required: ['pageIndex', 'itemIndex', 'width', 'height']
104
+ }
105
+ },
106
+ {
107
+ name: 'set_page_item_properties',
108
+ description: 'Set properties of a page item',
109
+ inputSchema: {
110
+ type: 'object',
111
+ properties: {
112
+ pageIndex: {
113
+ type: 'integer',
114
+ description: 'Index of the page containing the item'
115
+ },
116
+ itemIndex: {
117
+ type: 'integer',
118
+ description: 'Index of the page item to modify'
119
+ },
120
+ fillColor: {
121
+ type: 'string',
122
+ description: 'Fill color name'
123
+ },
124
+ strokeColor: {
125
+ type: 'string',
126
+ description: 'Stroke color name'
127
+ },
128
+ strokeWeight: {
129
+ type: 'number',
130
+ description: 'Stroke weight'
131
+ },
132
+ visible: {
133
+ type: 'boolean',
134
+ description: 'Whether the item is visible'
135
+ },
136
+ locked: {
137
+ type: 'boolean',
138
+ description: 'Whether the item is locked'
139
+ }
140
+ },
141
+ required: ['pageIndex', 'itemIndex']
142
+ }
143
+ },
144
+ {
145
+ name: 'duplicate_page_item',
146
+ description: 'Duplicate a page item',
147
+ inputSchema: {
148
+ type: 'object',
149
+ properties: {
150
+ pageIndex: {
151
+ type: 'integer',
152
+ description: 'Index of the page containing the item'
153
+ },
154
+ itemIndex: {
155
+ type: 'integer',
156
+ description: 'Index of the page item to duplicate'
157
+ },
158
+ x: {
159
+ type: 'number',
160
+ description: 'X coordinate for the duplicate'
161
+ },
162
+ y: {
163
+ type: 'number',
164
+ description: 'Y coordinate for the duplicate'
165
+ }
166
+ },
167
+ required: ['pageIndex', 'itemIndex', 'x', 'y']
168
+ }
169
+ },
170
+ {
171
+ name: 'delete_page_item',
172
+ description: 'Delete a page item',
173
+ inputSchema: {
174
+ type: 'object',
175
+ properties: {
176
+ pageIndex: {
177
+ type: 'integer',
178
+ description: 'Index of the page containing the item'
179
+ },
180
+ itemIndex: {
181
+ type: 'integer',
182
+ description: 'Index of the page item to delete'
183
+ }
184
+ },
185
+ required: ['pageIndex', 'itemIndex']
186
+ }
187
+ },
188
+ {
189
+ name: 'get_page_item_script_labels',
190
+ description: 'Read script labels from page items using selection or explicit identifiers',
191
+ inputSchema: {
192
+ type: 'object',
193
+ properties: {
194
+ mode: {
195
+ type: 'string',
196
+ enum: ['CURRENT_SELECTION', 'PAGE_ITEM', 'PAGE_NUMBER_AND_OBJECT_ID', 'ALL_WITH_LABELS'],
197
+ description: 'Selection mode: current selection, page/item indices, page number and object id, or sweep all labelled items',
198
+ default: 'CURRENT_SELECTION'
199
+ },
200
+ pageIndex: {
201
+ type: 'integer',
202
+ description: 'When mode=PAGE_ITEM, index of the page containing the item (zero-based)'
203
+ },
204
+ itemIndex: {
205
+ type: 'integer',
206
+ description: 'When mode=PAGE_ITEM, index of the page item (zero-based)'
207
+ },
208
+ pageNumber: {
209
+ type: 'integer',
210
+ description: 'When mode=PAGE_NUMBER_AND_OBJECT_ID, page number using documentOffset+1'
211
+ },
212
+ objectId: {
213
+ type: 'integer',
214
+ description: 'When mode=PAGE_NUMBER_AND_OBJECT_ID, InDesign object id of the page item'
215
+ }
216
+ },
217
+ additionalProperties: false
218
+ }
219
+ },
220
+ {
221
+ name: 'set_page_item_script_label',
222
+ description: 'Overwrite the script label for targeted page items',
223
+ inputSchema: {
224
+ type: 'object',
225
+ properties: {
226
+ mode: {
227
+ type: 'string',
228
+ enum: ['CURRENT_SELECTION', 'PAGE_ITEM', 'PAGE_NUMBER_AND_OBJECT_ID'],
229
+ description: 'Selection mode: current selection, page/item indices, or page number plus object id',
230
+ default: 'CURRENT_SELECTION'
231
+ },
232
+ pageIndex: {
233
+ type: 'integer',
234
+ description: 'When mode=PAGE_ITEM, index of the page containing the item (zero-based)'
235
+ },
236
+ itemIndex: {
237
+ type: 'integer',
238
+ description: 'When mode=PAGE_ITEM, index of the page item (zero-based)'
239
+ },
240
+ pageNumber: {
241
+ type: 'integer',
242
+ description: 'When mode=PAGE_NUMBER_AND_OBJECT_ID, page number using documentOffset+1'
243
+ },
244
+ objectId: {
245
+ type: 'integer',
246
+ description: 'When mode=PAGE_NUMBER_AND_OBJECT_ID, InDesign object id of the page item'
247
+ },
248
+ label: {
249
+ type: 'string',
250
+ description: 'Script label to assign; use empty string to clear',
251
+ default: ''
252
+ }
253
+ },
254
+ required: ['label'],
255
+ additionalProperties: false
256
+ }
257
+ },
258
+ {
259
+ name: 'list_page_items',
260
+ description: 'List all page items on a specific page',
261
+ inputSchema: {
262
+ type: 'object',
263
+ properties: {
264
+ pageIndex: {
265
+ type: 'integer',
266
+ description: 'Index of the page to list items from'
267
+ }
268
+ },
269
+ required: ['pageIndex'],
270
+ additionalProperties: false
271
+ }
272
+ },
273
+
274
+ // Group Management Tools
275
+ {
276
+ name: 'create_group',
277
+ description: 'Create a group from currently selected items',
278
+ inputSchema: {
279
+ type: 'object',
280
+ properties: {
281
+ pageIndex: {
282
+ type: 'integer',
283
+ description: 'Index of the page where the group will be created'
284
+ }
285
+ },
286
+ required: ['pageIndex'],
287
+ additionalProperties: false
288
+ }
289
+ },
290
+ {
291
+ name: 'create_group_from_items',
292
+ description: 'Create a group from specific page items by their indices',
293
+ inputSchema: {
294
+ type: 'object',
295
+ properties: {
296
+ pageIndex: {
297
+ type: 'integer',
298
+ description: 'Index of the page containing the items'
299
+ },
300
+ itemIndices: {
301
+ type: 'array',
302
+ items: {
303
+ type: 'integer'
304
+ },
305
+ description: 'Array of item indices to group together',
306
+ minItems: 2
307
+ }
308
+ },
309
+ required: ['pageIndex', 'itemIndices']
310
+ }
311
+ },
312
+ {
313
+ name: 'ungroup',
314
+ description: 'Ungroup a group, releasing all its items',
315
+ inputSchema: {
316
+ type: 'object',
317
+ properties: {
318
+ pageIndex: {
319
+ type: 'integer',
320
+ description: 'Index of the page containing the group'
321
+ },
322
+ groupIndex: {
323
+ type: 'integer',
324
+ description: 'Index of the group to ungroup'
325
+ }
326
+ },
327
+ required: ['pageIndex', 'groupIndex']
328
+ }
329
+ },
330
+ {
331
+ name: 'get_group_info',
332
+ description: 'Get detailed information about a group',
333
+ inputSchema: {
334
+ type: 'object',
335
+ properties: {
336
+ pageIndex: {
337
+ type: 'integer',
338
+ description: 'Index of the page containing the group'
339
+ },
340
+ groupIndex: {
341
+ type: 'integer',
342
+ description: 'Index of the group to get info for'
343
+ }
344
+ },
345
+ required: ['pageIndex', 'groupIndex']
346
+ }
347
+ },
348
+ {
349
+ name: 'add_item_to_group',
350
+ description: 'Add a page item to an existing group',
351
+ inputSchema: {
352
+ type: 'object',
353
+ properties: {
354
+ pageIndex: {
355
+ type: 'integer',
356
+ description: 'Index of the page containing the group and item'
357
+ },
358
+ groupIndex: {
359
+ type: 'integer',
360
+ description: 'Index of the group to add the item to'
361
+ },
362
+ itemIndex: {
363
+ type: 'integer',
364
+ description: 'Index of the page item to add to the group'
365
+ }
366
+ },
367
+ required: ['pageIndex', 'groupIndex', 'itemIndex']
368
+ }
369
+ },
370
+ {
371
+ name: 'remove_item_from_group',
372
+ description: 'Remove a page item from a group',
373
+ inputSchema: {
374
+ type: 'object',
375
+ properties: {
376
+ pageIndex: {
377
+ type: 'integer',
378
+ description: 'Index of the page containing the group'
379
+ },
380
+ groupIndex: {
381
+ type: 'integer',
382
+ description: 'Index of the group to remove the item from'
383
+ },
384
+ itemIndex: {
385
+ type: 'integer',
386
+ description: 'Index of the item within the group to remove'
387
+ }
388
+ },
389
+ required: ['pageIndex', 'groupIndex', 'itemIndex']
390
+ }
391
+ },
392
+ {
393
+ name: 'list_groups',
394
+ description: 'List all groups on a specific page',
395
+ inputSchema: {
396
+ type: 'object',
397
+ properties: {
398
+ pageIndex: {
399
+ type: 'integer',
400
+ description: 'Index of the page to list groups from'
401
+ }
402
+ },
403
+ required: ['pageIndex'],
404
+ additionalProperties: false
405
+ }
406
+ },
407
+ {
408
+ name: 'set_group_properties',
409
+ description: 'Set properties of a group',
410
+ inputSchema: {
411
+ type: 'object',
412
+ properties: {
413
+ pageIndex: {
414
+ type: 'integer',
415
+ description: 'Index of the page containing the group'
416
+ },
417
+ groupIndex: {
418
+ type: 'integer',
419
+ description: 'Index of the group to modify'
420
+ },
421
+ visible: {
422
+ type: 'boolean',
423
+ description: 'Whether the group is visible'
424
+ },
425
+ locked: {
426
+ type: 'boolean',
427
+ description: 'Whether the group is locked'
428
+ },
429
+ name: {
430
+ type: 'string',
431
+ description: 'Name for the group'
432
+ }
433
+ },
434
+ required: ['pageIndex', 'groupIndex']
435
+ }
436
+ }
437
+ ];
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Presentation tool definitions for InDesign MCP Server
3
+ */
4
+
5
+ // 注释:演示功能对纯设计流程不必要,暂时屏蔽以节省token
6
+ export const presentationToolDefinitions = [
7
+ /*
8
+ {
9
+ name: 'create_presentation_document',
10
+ description: 'Create a presentation document with preset or custom size',
11
+ inputSchema: {
12
+ type: 'object',
13
+ properties: {
14
+ preset: { type: 'string', enum: ['A3_LANDSCAPE', 'A4_LANDSCAPE', 'RATIO_16x9'], default: 'A3_LANDSCAPE' },
15
+ width: { type: 'number', description: 'Custom page width in mm (overrides preset)' },
16
+ height: { type: 'number', description: 'Custom page height in mm (overrides preset)' },
17
+ pages: { type: 'number', description: 'Initial number of pages', default: 1 },
18
+ facingPages: { type: 'boolean', description: 'Facing pages', default: false },
19
+ },
20
+ },
21
+ },
22
+ {
23
+ name: 'add_cover_page',
24
+ description: 'Add a cover page with title/subtitle and optional background image',
25
+ inputSchema: {
26
+ type: 'object',
27
+ properties: {
28
+ title: { type: 'string', default: '项目汇报' },
29
+ subtitle: { type: 'string', default: '' },
30
+ bgImagePath: { type: 'string', description: 'Background image file path (optional)' },
31
+ },
32
+ },
33
+ },
34
+ {
35
+ name: 'add_section_page',
36
+ description: 'Add a section page with large title',
37
+ inputSchema: {
38
+ type: 'object',
39
+ properties: { title: { type: 'string', default: '章节标题' },
40
+ additionalProperties: false
41
+ },
42
+ },
43
+ },
44
+ {
45
+ name: 'add_full_bleed_image',
46
+ description: 'Add a full-bleed image page with optional caption',
47
+ inputSchema: {
48
+ type: 'object',
49
+ properties: {
50
+ filePath: { type: 'string', description: 'Image path' },
51
+ caption: { type: 'string', description: 'Optional caption' },
52
+ },
53
+ required: ['filePath'],
54
+ },
55
+ },
56
+ {
57
+ name: 'add_image_grid',
58
+ description: 'Add an image grid page with rows/columns and gaps',
59
+ inputSchema: {
60
+ type: 'object',
61
+ properties: {
62
+ files: { type: 'array', description: 'Image file paths' },
63
+ rows: { type: 'number', default: 2 },
64
+ columns: { type: 'number', default: 3 },
65
+ gap: { type: 'number', default: 6 },
66
+ },
67
+ required: ['files'],
68
+ },
69
+ },
70
+ {
71
+ name: 'export_presentation_pdf',
72
+ description: 'Export the presentation as PDF (screen preset)',
73
+ inputSchema: {
74
+ type: 'object',
75
+ properties: {
76
+ filePath: { type: 'string', default: 'D:/Indesign-Exports/presentation.pdf' },
77
+ preset: { type: 'string', default: 'High Quality Print' },
78
+ },
79
+ },
80
+ },
81
+ */
82
+ ];
83
+
@@ -0,0 +1,158 @@
1
+ /**
2
+ * Spread tool definitions for InDesign MCP Server
3
+ * Spread management and functionality
4
+ */
5
+
6
+ export const spreadToolDefinitions = [
7
+ // =================== SPREAD MANAGEMENT ===================
8
+ {
9
+ name: 'list_spreads',
10
+ description: 'List all spreads in the document',
11
+ inputSchema: { type: 'object', properties: {},
12
+ additionalProperties: false
13
+ },
14
+ },
15
+ {
16
+ name: 'get_spread_info',
17
+ description: 'Get detailed information about a specific spread',
18
+ inputSchema: {
19
+ type: 'object',
20
+ properties: {
21
+ spreadIndex: { type: 'number', description: 'Spread index (0-based)' },
22
+ },
23
+ required: ['spreadIndex'],
24
+ },
25
+ },
26
+ {
27
+ name: 'duplicate_spread',
28
+ description: 'Duplicate a spread',
29
+ inputSchema: {
30
+ type: 'object',
31
+ properties: {
32
+ spreadIndex: { type: 'number', description: 'Spread index to duplicate' },
33
+ position: { type: 'string', enum: ['AT_END', 'AT_BEGINNING', 'BEFORE', 'AFTER'], default: 'AT_END' },
34
+ referenceSpreadIndex: { type: 'number', description: 'Reference spread index (for BEFORE/AFTER positioning)' },
35
+ },
36
+ required: ['spreadIndex'],
37
+ },
38
+ },
39
+ {
40
+ name: 'move_spread',
41
+ description: 'Move a spread to a different position',
42
+ inputSchema: {
43
+ type: 'object',
44
+ properties: {
45
+ spreadIndex: { type: 'number', description: 'Spread index to move' },
46
+ position: { type: 'string', enum: ['AT_END', 'AT_BEGINNING', 'BEFORE', 'AFTER'], default: 'AT_END' },
47
+ referenceSpreadIndex: { type: 'number', description: 'Reference spread index (for BEFORE/AFTER positioning)' },
48
+ },
49
+ required: ['spreadIndex'],
50
+ },
51
+ },
52
+ {
53
+ name: 'delete_spread',
54
+ description: 'Delete a spread',
55
+ inputSchema: {
56
+ type: 'object',
57
+ properties: {
58
+ spreadIndex: { type: 'number', description: 'Spread index to delete' },
59
+ },
60
+ required: ['spreadIndex'],
61
+ },
62
+ },
63
+ {
64
+ name: 'set_spread_properties',
65
+ description: 'Set properties for a spread',
66
+ inputSchema: {
67
+ type: 'object',
68
+ properties: {
69
+ spreadIndex: { type: 'number', description: 'Spread index' },
70
+ name: { type: 'string', description: 'Spread name/label' },
71
+ allowPageShuffle: { type: 'boolean', description: 'Allow page shuffle' },
72
+ showMasterItems: { type: 'boolean', description: 'Show master items' },
73
+ spreadHidden: { type: 'boolean', description: 'Hide/show spread' },
74
+ pageTransitionType: { type: 'string', enum: ['NONE', 'BLINDS_TRANSITION', 'BOX_TRANSITION', 'COMB_TRANSITION', 'COVER_TRANSITION', 'DISSOLVE_TRANSITION', 'FADE_TRANSITION', 'PUSH_TRANSITION', 'SPLIT_TRANSITION', 'UNCOVER_TRANSITION', 'WIPE_TRANSITION', 'ZOOM_IN_TRANSITION', 'ZOOM_OUT_TRANSITION'], description: 'Page transition type' },
75
+ pageTransitionDirection: { type: 'string', enum: ['HORIZONTAL', 'VERTICAL', 'HORIZONTAL_IN', 'HORIZONTAL_OUT', 'VERTICAL_IN', 'VERTICAL_OUT', 'LEFT_TO_RIGHT', 'RIGHT_TO_LEFT', 'UP', 'DOWN', 'LEFT_UP', 'LEFT_DOWN', 'RIGHT_UP', 'RIGHT_DOWN', 'IN', 'OUT', 'NOT_APPLICABLE'], description: 'Page transition direction' },
76
+ pageTransitionDuration: { type: 'string', enum: ['FAST', 'MEDIUM', 'SLOW'], description: 'Page transition duration' },
77
+ },
78
+ required: ['spreadIndex'],
79
+ },
80
+ },
81
+ {
82
+ name: 'create_spread_guides',
83
+ description: 'Create guides on a spread',
84
+ inputSchema: {
85
+ type: 'object',
86
+ properties: {
87
+ spreadIndex: { type: 'number', description: 'Spread index' },
88
+ numberOfRows: { type: 'number', description: 'Number of rows', default: 0 },
89
+ numberOfColumns: { type: 'number', description: 'Number of columns', default: 0 },
90
+ rowGutter: { type: 'number', description: 'Row gutter in mm', default: 5 },
91
+ columnGutter: { type: 'number', description: 'Column gutter in mm', default: 5 },
92
+ guideColor: { type: 'string', description: 'Guide color (RGB values as comma-separated string or UI color name)', default: 'BLUE' },
93
+ fitMargins: { type: 'boolean', description: 'Fit guides to margins', default: true },
94
+ removeExisting: { type: 'boolean', description: 'Remove existing guides', default: false },
95
+ layerName: { type: 'string', description: 'Layer name to create guides on' },
96
+ },
97
+ required: ['spreadIndex'],
98
+ },
99
+ },
100
+ {
101
+ name: 'place_file_on_spread',
102
+ description: 'Place a file on a spread',
103
+ inputSchema: {
104
+ type: 'object',
105
+ properties: {
106
+ spreadIndex: { type: 'number', description: 'Spread index' },
107
+ filePath: { type: 'string', description: 'Path to file to place' },
108
+ x: { type: 'number', description: 'X position in mm', default: 10 },
109
+ y: { type: 'number', description: 'Y position in mm', default: 10 },
110
+ layerName: { type: 'string', description: 'Layer name to place on' },
111
+ showingOptions: { type: 'boolean', description: 'Show import options dialog', default: false },
112
+ autoflowing: { type: 'boolean', description: 'Autoflow placed text', default: false },
113
+ pageIndexWithinSpread: { type: 'number', description: 'Page index within the spread (0-based)', default: 0 },
114
+ },
115
+ required: ['spreadIndex', 'filePath'],
116
+ },
117
+ },
118
+ /* 注释:XML内容放置功能对纯设计流程不必要
119
+ {
120
+ name: 'place_xml_on_spread',
121
+ description: 'Place XML content on a spread',
122
+ inputSchema: {
123
+ type: 'object',
124
+ properties: {
125
+ spreadIndex: { type: 'number', description: 'Spread index' },
126
+ xmlElementName: { type: 'string', description: 'XML element name to place' },
127
+ x: { type: 'number', description: 'X position in mm', default: 10 },
128
+ y: { type: 'number', description: 'Y position in mm', default: 10 },
129
+ autoflowing: { type: 'boolean', description: 'Autoflow placed text', default: false },
130
+ },
131
+ required: ['spreadIndex', 'xmlElementName'],
132
+ },
133
+ },
134
+ */
135
+ {
136
+ name: 'select_spread',
137
+ description: 'Select a spread',
138
+ inputSchema: {
139
+ type: 'object',
140
+ properties: {
141
+ spreadIndex: { type: 'number', description: 'Spread index to select' },
142
+ selectionMode: { type: 'string', enum: ['REPLACE_WITH', 'ADD_TO', 'REMOVE_FROM', 'SET_KEY'], default: 'REPLACE_WITH' },
143
+ },
144
+ required: ['spreadIndex'],
145
+ },
146
+ },
147
+ {
148
+ name: 'get_spread_content_summary',
149
+ description: 'Get a summary of content on a spread',
150
+ inputSchema: {
151
+ type: 'object',
152
+ properties: {
153
+ spreadIndex: { type: 'number', description: 'Spread index' },
154
+ },
155
+ required: ['spreadIndex'],
156
+ },
157
+ },
158
+ ];