@tiwater/office-mcp 0.14.2 → 0.15.0

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 (90) hide show
  1. package/office/README.md +10 -10
  2. package/office/contracts/docx_apply_font_policy.schema.json +73 -0
  3. package/office/contracts/docx_apply_toc_style_policy.schema.json +49 -0
  4. package/office/contracts/docx_collapse_trailing_empty_paragraphs.schema.json +26 -0
  5. package/office/contracts/docx_collapse_trailing_empty_section.schema.json +26 -0
  6. package/office/contracts/docx_compare.schema.json +19 -0
  7. package/office/contracts/docx_copy_table_range.schema.json +111 -0
  8. package/office/contracts/docx_delete_body_drawing_before_paragraph.schema.json +50 -0
  9. package/office/contracts/docx_delete_body_paragraph.schema.json +50 -0
  10. package/office/contracts/docx_delete_body_range.schema.json +65 -0
  11. package/office/contracts/docx_delete_comments.schema.json +48 -0
  12. package/office/contracts/docx_delete_table_rows.schema.json +57 -0
  13. package/office/contracts/docx_export_json.schema.json +20 -0
  14. package/office/contracts/docx_find_literal.schema.json +46 -0
  15. package/office/contracts/docx_freeze_fields.schema.json +26 -0
  16. package/office/contracts/docx_insert_body_image.schema.json +65 -0
  17. package/office/contracts/docx_insert_body_range.schema.json +62 -0
  18. package/office/contracts/docx_insert_table_columns.schema.json +61 -0
  19. package/office/contracts/docx_insert_table_rows.schema.json +130 -0
  20. package/office/contracts/docx_inspect.schema.json +20 -0
  21. package/office/contracts/docx_inspect_tables.schema.json +20 -0
  22. package/office/contracts/docx_list_objects.schema.json +42 -0
  23. package/office/contracts/docx_mark_fields_dirty.schema.json +26 -0
  24. package/office/contracts/docx_merge_table_cells.schema.json +80 -0
  25. package/office/contracts/docx_read_object.schema.json +24 -0
  26. package/office/contracts/docx_replace_body_text.schema.json +48 -0
  27. package/office/contracts/docx_replace_drawing_image.schema.json +56 -0
  28. package/office/contracts/docx_replace_header_text.schema.json +48 -0
  29. package/office/contracts/docx_replace_style_ids.schema.json +29 -0
  30. package/office/contracts/docx_replace_table_rows.schema.json +136 -0
  31. package/office/contracts/docx_sanitize_fields.schema.json +26 -0
  32. package/office/contracts/docx_set_anchored_text.schema.json +48 -0
  33. package/office/contracts/docx_set_body_paragraph_keep_lines.schema.json +49 -0
  34. package/office/contracts/docx_set_body_paragraph_keep_next.schema.json +49 -0
  35. package/office/contracts/docx_set_footer_paragraph_text.schema.json +55 -0
  36. package/office/contracts/docx_set_footer_run_text.schema.json +61 -0
  37. package/office/contracts/docx_set_footer_table_cell_run_text.schema.json +79 -0
  38. package/office/contracts/docx_set_footer_table_cell_text.schema.json +67 -0
  39. package/office/contracts/docx_set_header_paragraph_font_size.schema.json +56 -0
  40. package/office/contracts/docx_set_header_paragraph_text.schema.json +55 -0
  41. package/office/contracts/docx_set_header_run_text.schema.json +61 -0
  42. package/office/contracts/docx_set_header_table_cell_run_text.schema.json +79 -0
  43. package/office/contracts/docx_set_header_table_cell_text.schema.json +67 -0
  44. package/office/contracts/docx_set_paragraph_run_text.schema.json +55 -0
  45. package/office/contracts/docx_set_paragraph_text.schema.json +49 -0
  46. package/office/contracts/docx_set_table_cell_alignment.schema.json +62 -0
  47. package/office/contracts/docx_set_table_cell_font_size.schema.json +62 -0
  48. package/office/contracts/docx_set_table_cell_no_wrap.schema.json +61 -0
  49. package/office/contracts/docx_set_table_cell_rich_text.schema.json +96 -0
  50. package/office/contracts/docx_set_table_cell_run_text.schema.json +73 -0
  51. package/office/contracts/docx_set_table_cell_text.schema.json +64 -0
  52. package/office/contracts/docx_set_table_row_cant_split.schema.json +55 -0
  53. package/office/contracts/docx_set_table_row_height.schema.json +59 -0
  54. package/office/contracts/docx_set_table_row_keep_next.schema.json +55 -0
  55. package/office/contracts/docx_set_table_row_repeat_as_header.schema.json +119 -0
  56. package/office/contracts/docx_set_table_width.schema.json +60 -0
  57. package/office/contracts/docx_start_section.schema.json +52 -0
  58. package/office/contracts/docx_strip_direct_formatting.schema.json +19 -0
  59. package/office/contracts/docx_unmerge_table_column_cells.schema.json +63 -0
  60. package/office/contracts/docx_unmerge_table_row_cells.schema.json +57 -0
  61. package/office/contracts/docx_validate.schema.json +14 -0
  62. package/office/contracts/docx_validate_font_policy.schema.json +48 -0
  63. package/office/contracts/docx_validate_toc_style_policy.schema.json +24 -0
  64. package/office/contracts/office_render_pdf.schema.json +27 -0
  65. package/office/contracts/pptx_apply_format.schema.json +74 -0
  66. package/office/contracts/pptx_apply_template.schema.json +111 -0
  67. package/office/contracts/pptx_export_json.schema.json +20 -0
  68. package/office/contracts/pptx_inspect.schema.json +20 -0
  69. package/office/contracts/pptx_replace_picture_image.schema.json +57 -0
  70. package/office/contracts/pptx_set_shape_geometry.schema.json +76 -0
  71. package/office/contracts/pptx_validate.schema.json +14 -0
  72. package/office/contracts/tiwater-office-provider-contract-manifest-v1.json +955 -0
  73. package/office/contracts/xlsx_convert_legacy.schema.json +24 -0
  74. package/office/contracts/xlsx_copy_row.schema.json +59 -0
  75. package/office/contracts/xlsx_delete_rows.schema.json +56 -0
  76. package/office/contracts/xlsx_expand_section_rows.schema.json +70 -0
  77. package/office/contracts/xlsx_export_json.schema.json +24 -0
  78. package/office/contracts/xlsx_insert_rows.schema.json +62 -0
  79. package/office/contracts/xlsx_inspect.schema.json +20 -0
  80. package/office/contracts/xlsx_set_cell_number_format.schema.json +54 -0
  81. package/office/contracts/xlsx_set_cell_value.schema.json +78 -0
  82. package/office/contracts/xlsx_set_column_width.schema.json +55 -0
  83. package/office/contracts/xlsx_set_page_setup.schema.json +90 -0
  84. package/office/contracts/xlsx_set_print_area.schema.json +49 -0
  85. package/office/contracts/xlsx_set_range_values.schema.json +75 -0
  86. package/office/contracts/xlsx_set_rich_text_cell_value.schema.json +57 -0
  87. package/office/contracts/xlsx_set_row_page_breaks.schema.json +53 -0
  88. package/office/contracts/xlsx_validate.schema.json +14 -0
  89. package/office/index.mjs +188 -493
  90. package/package.json +2 -7
@@ -0,0 +1,63 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "output": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "description": "New document output path. Existing files are never overwritten."
13
+ },
14
+ "receiptOutput": {
15
+ "type": "string",
16
+ "minLength": 1,
17
+ "description": "New JSON receipt path. Existing files are never overwritten."
18
+ },
19
+ "changes": {
20
+ "minItems": 1,
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "tableIndex": {
26
+ "type": "integer",
27
+ "minimum": 0,
28
+ "maximum": 9007199254740991
29
+ },
30
+ "cellIndex": {
31
+ "type": "integer",
32
+ "minimum": 0,
33
+ "maximum": 9007199254740991
34
+ },
35
+ "startRowIndex": {
36
+ "type": "integer",
37
+ "minimum": 0,
38
+ "maximum": 9007199254740991
39
+ },
40
+ "endRowIndex": {
41
+ "type": "integer",
42
+ "minimum": 0,
43
+ "maximum": 9007199254740991
44
+ }
45
+ },
46
+ "required": [
47
+ "tableIndex",
48
+ "cellIndex",
49
+ "startRowIndex",
50
+ "endRowIndex"
51
+ ],
52
+ "additionalProperties": false
53
+ }
54
+ }
55
+ },
56
+ "required": [
57
+ "input",
58
+ "output",
59
+ "receiptOutput",
60
+ "changes"
61
+ ],
62
+ "additionalProperties": false
63
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "output": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "description": "New document output path. Existing files are never overwritten."
13
+ },
14
+ "receiptOutput": {
15
+ "type": "string",
16
+ "minLength": 1,
17
+ "description": "New JSON receipt path. Existing files are never overwritten."
18
+ },
19
+ "changes": {
20
+ "minItems": 1,
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "tableIndex": {
26
+ "type": "integer",
27
+ "minimum": 0,
28
+ "maximum": 9007199254740991
29
+ },
30
+ "rowIndex": {
31
+ "type": "integer",
32
+ "minimum": 0,
33
+ "maximum": 9007199254740991
34
+ },
35
+ "cellIndex": {
36
+ "type": "integer",
37
+ "minimum": 0,
38
+ "maximum": 9007199254740991
39
+ }
40
+ },
41
+ "required": [
42
+ "tableIndex",
43
+ "rowIndex",
44
+ "cellIndex"
45
+ ],
46
+ "additionalProperties": false
47
+ }
48
+ }
49
+ },
50
+ "required": [
51
+ "input",
52
+ "output",
53
+ "receiptOutput",
54
+ "changes"
55
+ ],
56
+ "additionalProperties": false
57
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": [
11
+ "input"
12
+ ],
13
+ "additionalProperties": false
14
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "policy": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schema": {
13
+ "type": "string",
14
+ "minLength": 1
15
+ },
16
+ "body": {
17
+ "type": "object",
18
+ "propertyNames": {
19
+ "type": "string"
20
+ },
21
+ "additionalProperties": {
22
+ "type": "string"
23
+ }
24
+ },
25
+ "table": {
26
+ "type": "object",
27
+ "propertyNames": {
28
+ "type": "string"
29
+ },
30
+ "additionalProperties": {
31
+ "type": "string"
32
+ }
33
+ }
34
+ },
35
+ "required": [
36
+ "schema",
37
+ "body",
38
+ "table"
39
+ ],
40
+ "additionalProperties": false
41
+ }
42
+ },
43
+ "required": [
44
+ "input",
45
+ "policy"
46
+ ],
47
+ "additionalProperties": false
48
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "italic": {
10
+ "type": "boolean"
11
+ },
12
+ "indentCharactersPerLevel": {
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ }
17
+ },
18
+ "required": [
19
+ "input",
20
+ "italic",
21
+ "indentCharactersPerLevel"
22
+ ],
23
+ "additionalProperties": false
24
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "description": "Path to the current Office document."
9
+ },
10
+ "output": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "description": "New PDF output path. Existing files are never overwritten."
14
+ },
15
+ "receiptOutput": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "description": "New JSON receipt path. Existing files are never overwritten."
19
+ }
20
+ },
21
+ "required": [
22
+ "input",
23
+ "output",
24
+ "receiptOutput"
25
+ ],
26
+ "additionalProperties": false
27
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "description": "Path to the current PPTX."
9
+ },
10
+ "changes": {
11
+ "minItems": 1,
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "slideNumber": {
17
+ "type": "integer",
18
+ "exclusiveMinimum": 0,
19
+ "maximum": 9007199254740991
20
+ },
21
+ "shapeId": {
22
+ "type": "integer",
23
+ "exclusiveMinimum": 0,
24
+ "maximum": 9007199254740991
25
+ },
26
+ "runIndex": {
27
+ "type": "integer",
28
+ "minimum": 0,
29
+ "maximum": 9007199254740991
30
+ },
31
+ "fontFamily": {
32
+ "type": "string"
33
+ },
34
+ "fontSize": {
35
+ "type": "number",
36
+ "exclusiveMinimum": 0
37
+ },
38
+ "color": {
39
+ "type": "string"
40
+ },
41
+ "bold": {
42
+ "type": "boolean"
43
+ },
44
+ "paragraphAlignment": {
45
+ "type": "string"
46
+ }
47
+ },
48
+ "required": [
49
+ "slideNumber",
50
+ "shapeId",
51
+ "runIndex"
52
+ ],
53
+ "additionalProperties": false
54
+ }
55
+ },
56
+ "output": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "description": "New PPTX output path. Existing files are never overwritten."
60
+ },
61
+ "receiptOutput": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "description": "New JSON receipt path. Existing files are never overwritten."
65
+ }
66
+ },
67
+ "required": [
68
+ "input",
69
+ "changes",
70
+ "output",
71
+ "receiptOutput"
72
+ ],
73
+ "additionalProperties": false
74
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "description": "Path to the current source PPTX."
9
+ },
10
+ "template": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "description": "Path to the selected current template PPTX."
14
+ },
15
+ "targetMasterPath": {
16
+ "type": "string",
17
+ "minLength": 1
18
+ },
19
+ "slides": {
20
+ "minItems": 1,
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "slideNumber": {
26
+ "type": "integer",
27
+ "exclusiveMinimum": 0,
28
+ "maximum": 9007199254740991
29
+ },
30
+ "targetLayoutPath": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "contentBounds": {
35
+ "type": "object",
36
+ "properties": {
37
+ "x": {
38
+ "type": "integer",
39
+ "minimum": 0,
40
+ "maximum": 9007199254740991
41
+ },
42
+ "y": {
43
+ "type": "integer",
44
+ "minimum": 0,
45
+ "maximum": 9007199254740991
46
+ },
47
+ "cx": {
48
+ "type": "integer",
49
+ "exclusiveMinimum": 0,
50
+ "maximum": 9007199254740991
51
+ },
52
+ "cy": {
53
+ "type": "integer",
54
+ "exclusiveMinimum": 0,
55
+ "maximum": 9007199254740991
56
+ }
57
+ },
58
+ "required": [
59
+ "x",
60
+ "y",
61
+ "cx",
62
+ "cy"
63
+ ],
64
+ "additionalProperties": false
65
+ },
66
+ "contentShapeIds": {
67
+ "minItems": 1,
68
+ "type": "array",
69
+ "items": {
70
+ "type": "integer",
71
+ "exclusiveMinimum": 0,
72
+ "maximum": 9007199254740991
73
+ }
74
+ },
75
+ "sourceLayoutShapeIdsToPreserve": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "integer",
79
+ "exclusiveMinimum": 0,
80
+ "maximum": 9007199254740991
81
+ }
82
+ }
83
+ },
84
+ "required": [
85
+ "slideNumber",
86
+ "targetLayoutPath"
87
+ ],
88
+ "additionalProperties": false
89
+ }
90
+ },
91
+ "output": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "description": "New PPTX output path. Existing files are never overwritten."
95
+ },
96
+ "receiptOutput": {
97
+ "type": "string",
98
+ "minLength": 1,
99
+ "description": "New JSON receipt path. Existing files are never overwritten."
100
+ }
101
+ },
102
+ "required": [
103
+ "input",
104
+ "template",
105
+ "targetMasterPath",
106
+ "slides",
107
+ "output",
108
+ "receiptOutput"
109
+ ],
110
+ "additionalProperties": false
111
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "output": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "description": "New JSON artifact path. Existing files are never overwritten."
13
+ }
14
+ },
15
+ "required": [
16
+ "input",
17
+ "output"
18
+ ],
19
+ "additionalProperties": false
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "output": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "description": "New JSON artifact path. Existing files are never overwritten."
13
+ }
14
+ },
15
+ "required": [
16
+ "input",
17
+ "output"
18
+ ],
19
+ "additionalProperties": false
20
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "description": "Path to the current PPTX."
9
+ },
10
+ "changes": {
11
+ "minItems": 1,
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "slideNumber": {
17
+ "type": "integer",
18
+ "exclusiveMinimum": 0,
19
+ "maximum": 9007199254740991
20
+ },
21
+ "shapeId": {
22
+ "type": "integer",
23
+ "exclusiveMinimum": 0,
24
+ "maximum": 4294967295
25
+ },
26
+ "image": {
27
+ "type": "string",
28
+ "minLength": 1
29
+ }
30
+ },
31
+ "required": [
32
+ "slideNumber",
33
+ "shapeId",
34
+ "image"
35
+ ],
36
+ "additionalProperties": false
37
+ }
38
+ },
39
+ "output": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "description": "New PPTX output path. Existing files are never overwritten."
43
+ },
44
+ "receiptOutput": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "description": "New JSON receipt path. Existing files are never overwritten."
48
+ }
49
+ },
50
+ "required": [
51
+ "input",
52
+ "changes",
53
+ "output",
54
+ "receiptOutput"
55
+ ],
56
+ "additionalProperties": false
57
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "description": "Path to the current PPTX."
9
+ },
10
+ "changes": {
11
+ "minItems": 1,
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "slideNumber": {
17
+ "type": "integer",
18
+ "exclusiveMinimum": 0,
19
+ "maximum": 9007199254740991
20
+ },
21
+ "shapeId": {
22
+ "type": "integer",
23
+ "exclusiveMinimum": 0,
24
+ "maximum": 4294967295
25
+ },
26
+ "x": {
27
+ "type": "integer",
28
+ "minimum": -9007199254740991,
29
+ "maximum": 9007199254740991
30
+ },
31
+ "y": {
32
+ "type": "integer",
33
+ "minimum": -9007199254740991,
34
+ "maximum": 9007199254740991
35
+ },
36
+ "cx": {
37
+ "type": "integer",
38
+ "exclusiveMinimum": 0,
39
+ "maximum": 9007199254740991
40
+ },
41
+ "cy": {
42
+ "type": "integer",
43
+ "exclusiveMinimum": 0,
44
+ "maximum": 9007199254740991
45
+ }
46
+ },
47
+ "required": [
48
+ "slideNumber",
49
+ "shapeId",
50
+ "x",
51
+ "y",
52
+ "cx",
53
+ "cy"
54
+ ],
55
+ "additionalProperties": false
56
+ }
57
+ },
58
+ "output": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "description": "New PPTX output path. Existing files are never overwritten."
62
+ },
63
+ "receiptOutput": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "description": "New JSON receipt path. Existing files are never overwritten."
67
+ }
68
+ },
69
+ "required": [
70
+ "input",
71
+ "changes",
72
+ "output",
73
+ "receiptOutput"
74
+ ],
75
+ "additionalProperties": false
76
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "input": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": [
11
+ "input"
12
+ ],
13
+ "additionalProperties": false
14
+ }