@tiwater/office-mcp 0.21.47 → 0.21.49

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.
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "tiwater.office-mcp-input/docx_delete_comments",
4
+ "type": "object",
5
+ "properties": {
6
+ "input": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "x-tiwater-file-role": "read",
10
+ "x-tiwater-document-revision-role": "current"
11
+ },
12
+ "output": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "description": "Output DOCX path; may equal input for an atomic in-place update.",
16
+ "x-tiwater-file-role": "write"
17
+ },
18
+ "receiptOutput": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "x-tiwater-file-role": "write",
22
+ "x-tiwater-file-effect": false
23
+ }
24
+ },
25
+ "required": [
26
+ "input",
27
+ "output",
28
+ "receiptOutput"
29
+ ],
30
+ "additionalProperties": false
31
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "tiwater.office-mcp-input/docx_set_table_width",
4
+ "type": "object",
5
+ "properties": {
6
+ "input": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "x-tiwater-file-role": "read",
10
+ "x-tiwater-document-revision-role": "current"
11
+ },
12
+ "changes": {
13
+ "type": "array",
14
+ "minItems": 1,
15
+ "items": {
16
+ "type": "object",
17
+ "properties": {
18
+ "table": {
19
+ "type": "object",
20
+ "properties": {
21
+ "part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
22
+ "path": { "type": "string", "pattern": "^\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\](?:\\/[A-Za-z_][A-Za-z0-9_.-]*:[A-Za-z_][A-Za-z0-9_.-]*\\[[1-9][0-9]*\\])*$" }
23
+ },
24
+ "required": ["part", "path"],
25
+ "additionalProperties": false
26
+ },
27
+ "width": {
28
+ "oneOf": [
29
+ {
30
+ "type": "object",
31
+ "properties": {
32
+ "type": { "type": "string", "enum": ["dxa", "pct"] },
33
+ "value": { "type": "string", "pattern": "^[1-9][0-9]*$" }
34
+ },
35
+ "required": ["type", "value"],
36
+ "additionalProperties": false
37
+ },
38
+ {
39
+ "type": "object",
40
+ "properties": {
41
+ "type": { "type": "string", "enum": ["auto", "nil"] },
42
+ "value": { "type": "string", "const": "0" }
43
+ },
44
+ "required": ["type", "value"],
45
+ "additionalProperties": false
46
+ }
47
+ ]
48
+ }
49
+ },
50
+ "required": ["table", "width"],
51
+ "additionalProperties": false
52
+ }
53
+ },
54
+ "output": {
55
+ "type": "string",
56
+ "minLength": 1,
57
+ "description": "Output DOCX path; may equal input for an atomic in-place update.",
58
+ "x-tiwater-file-role": "write"
59
+ },
60
+ "receiptOutput": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "x-tiwater-file-role": "write",
64
+ "x-tiwater-file-effect": false
65
+ }
66
+ },
67
+ "required": ["input", "changes", "output", "receiptOutput"],
68
+ "additionalProperties": false
69
+ }
@@ -34,6 +34,11 @@
34
34
  },
35
35
  "text": {
36
36
  "type": "string"
37
+ },
38
+ "fontName": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "description": "Optional Latin and complex-script font family for the replacement run. East Asian font settings remain inherited from the target."
37
42
  }
38
43
  },
39
44
  "required": [
@@ -2,7 +2,7 @@
2
2
  "schema": "tiwater.office-provider-contract-manifest/v1",
3
3
  "provider": {
4
4
  "id": "@tiwater/office-mcp",
5
- "version": "0.21.47"
5
+ "version": "0.21.49"
6
6
  },
7
7
  "tools": [
8
8
  {
@@ -49,6 +49,17 @@
49
49
  "sha256": "1cf22a23fc5d8b27fff6f50db2672be623696eac79ea986053e703274eab5e3e"
50
50
  }
51
51
  },
52
+ {
53
+ "name": "docx_delete_comments",
54
+ "providerContract": {
55
+ "source": "packages/docx-cli/contracts/mcp-input/docx_delete_comments.schema.json",
56
+ "sha256": "7f0828426b1f7c53a39dab1789572d49415a5a59980729a07726f662c1fb43de"
57
+ },
58
+ "inputContract": {
59
+ "path": "office/contracts/docx_delete_comments.schema.json",
60
+ "sha256": "7f0828426b1f7c53a39dab1789572d49415a5a59980729a07726f662c1fb43de"
61
+ }
62
+ },
52
63
  {
53
64
  "name": "docx_delete_object",
54
65
  "providerContract": {
@@ -214,15 +225,26 @@
214
225
  "sha256": "d04c40174ce3427689c970b26dd3a282f9d9f6889e4c5ac737eca5926ef709b9"
215
226
  }
216
227
  },
228
+ {
229
+ "name": "docx_set_table_width",
230
+ "providerContract": {
231
+ "source": "packages/docx-cli/contracts/mcp-input/docx_set_table_width.schema.json",
232
+ "sha256": "7a51a25a139ffa57c76eeed43dc2a8b9252fafdc0d299ede995f68d44021a3a6"
233
+ },
234
+ "inputContract": {
235
+ "path": "office/contracts/docx_set_table_width.schema.json",
236
+ "sha256": "7a51a25a139ffa57c76eeed43dc2a8b9252fafdc0d299ede995f68d44021a3a6"
237
+ }
238
+ },
217
239
  {
218
240
  "name": "docx_set_text",
219
241
  "providerContract": {
220
242
  "source": "packages/docx-cli/contracts/mcp-input/docx_set_text.schema.json",
221
- "sha256": "4d6f69ef474c0a3ceade95cce362fba7e000946bb890e64119177c5519524db2"
243
+ "sha256": "45d8aa5d95402ac5b17fe07540355f81afa0804214ef319f33d7da11cf3c56cc"
222
244
  },
223
245
  "inputContract": {
224
246
  "path": "office/contracts/docx_set_text.schema.json",
225
- "sha256": "4d6f69ef474c0a3ceade95cce362fba7e000946bb890e64119177c5519524db2"
247
+ "sha256": "45d8aa5d95402ac5b17fe07540355f81afa0804214ef319f33d7da11cf3c56cc"
226
248
  }
227
249
  },
228
250
  {
package/office/index.mjs CHANGED
@@ -497,6 +497,10 @@ const docxTableReadOutput = docxObservationOutput('docx_read_table').extend({
497
497
  address: docxAddress,
498
498
  rowCount: z.number().int().nonnegative(),
499
499
  columnCount: z.number().int().nonnegative(),
500
+ tableWidth: z.object({
501
+ type: z.enum(['auto', 'dxa', 'nil', 'pct']),
502
+ value: z.string(),
503
+ }).strict().nullable(),
500
504
  gridColumns: z.array(z.object({
501
505
  address: docxAddress,
502
506
  widthTwips: z.number().int().positive().nullable(),
@@ -598,10 +602,18 @@ const tools = [
598
602
  outputSchema: fixedEditOutput('docx_replace_content_from_source'),
599
603
  handler: async (args, tool) => fixedEdit(tool, await resolveFileBackedChanges(args), docxCandidates),
600
604
  },
605
+ {
606
+ name: 'docx_delete_comments',
607
+ effectKind: 'document-mutation',
608
+ description: 'Atomically remove all Word comments, their anchors, and comment metadata parts from one current DOCX while preserving visible body, header, footer, footnote, endnote, table, field, and drawing content. This does not accept selected comment ids, change visible document wording, or decide whether comments are business content.',
609
+ inputSchema: inputContract('docx_delete_comments'),
610
+ outputSchema: fixedEditOutput('docx_delete_comments'),
611
+ handler: (args, tool) => fixedEdit(tool, args, docxCandidates),
612
+ },
601
613
  {
602
614
  name: 'docx_set_text',
603
615
  effectKind: 'document-mutation',
604
- description: 'Replace the whole text content of paragraph or cell objects observed from this exact input DOCX while retaining target formatting, bookmarks, spans, and vertical merges. For a vertically merged logical cell, write its visible text to the restart cell rather than a continue cell. Tabs and line breaks remain native document text controls; targets containing non-text objects are rejected. Use this only for newly derived text. Content copied or selected from a source DOCX uses docx_replace_content_from_source so native runs such as superscript and subscript are retained. This does not insert objects, change table structure, copy source formatting, or decide business wording.',
616
+ description: 'Replace the whole text content of paragraph or cell objects observed from this exact input DOCX while retaining target formatting, bookmarks, spans, and vertical merges. A change may explicitly set the Latin and complex-script font family of its nonempty replacement run; East Asian font settings remain inherited from the target. For a vertically merged logical cell, write its visible text to the restart cell rather than a continue cell. Tabs and line breaks remain native document text controls; targets containing non-text objects are rejected. Use this only for newly derived text. Content copied or selected from a source DOCX uses docx_replace_content_from_source so native runs such as superscript and subscript are retained. This does not insert objects, change table structure, copy source formatting, or decide business wording.',
605
617
  inputSchema: inputContract('docx_set_text'),
606
618
  outputSchema: fixedEditOutput('docx_set_text'),
607
619
  handler: (args, tool) => fixedEdit(tool, args, docxCandidates),
@@ -614,6 +626,14 @@ const tools = [
614
626
  outputSchema: fixedEditOutput('docx_set_paragraph_pagination'),
615
627
  handler: (args, tool) => fixedEdit(tool, args, docxCandidates),
616
628
  },
629
+ {
630
+ name: 'docx_set_table_width',
631
+ effectKind: 'document-mutation',
632
+ description: 'Set the explicit native width of one or more selected current DOCX tables. Width type is pct, dxa, auto, or nil; pct/dxa take an exact positive Open XML value and auto/nil take 0. This does not change grid-column widths, autofit behavior, cell widths, table structure, content, or business meaning.',
633
+ inputSchema: inputContract('docx_set_table_width'),
634
+ outputSchema: fixedEditOutput('docx_set_table_width'),
635
+ handler: (args, tool) => fixedEdit(tool, args, docxCandidates),
636
+ },
617
637
  {
618
638
  name: 'docx_set_table',
619
639
  effectKind: 'document-mutation',
@@ -1103,6 +1123,7 @@ async function docxObservation(tool, args) {
1103
1123
  address: payload.address,
1104
1124
  rowCount: payload.rowCount,
1105
1125
  columnCount: payload.columnCount,
1126
+ tableWidth: payload.tableWidth,
1106
1127
  gridColumns: payload.gridColumns,
1107
1128
  precedingParagraph: payload.precedingParagraph,
1108
1129
  followingParagraph: payload.followingParagraph,
@@ -1120,6 +1141,7 @@ async function docxObservation(tool, args) {
1120
1141
  address: payload.address,
1121
1142
  rowCount: payload.rowCount,
1122
1143
  columnCount: payload.columnCount,
1144
+ tableWidth: payload.tableWidth,
1123
1145
  gridColumns: payload.gridColumns,
1124
1146
  precedingParagraph: payload.precedingParagraph,
1125
1147
  followingParagraph: payload.followingParagraph,
@@ -1175,6 +1197,7 @@ async function docxObservation(tool, args) {
1175
1197
  address: payload.address,
1176
1198
  rowCount: payload.rowCount,
1177
1199
  columnCount: payload.columnCount,
1200
+ tableWidth: payload.tableWidth,
1178
1201
  gridColumns: payload.gridColumns,
1179
1202
  precedingParagraph: payload.precedingParagraph,
1180
1203
  followingParagraph: payload.followingParagraph,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiwater/office-mcp",
3
- "version": "0.21.47",
3
+ "version": "0.21.49",
4
4
  "description": "Published MCP distribution for independent Tiwater Office, PDF, and Text document capabilities",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -2,7 +2,7 @@
2
2
  "schema": "tiwater.pdf-provider-contract-manifest/v1",
3
3
  "provider": {
4
4
  "id": "@tiwater/office-mcp",
5
- "version": "0.21.47"
5
+ "version": "0.21.49"
6
6
  },
7
7
  "runtime": {
8
8
  "command": "tiwater-pdf"
@@ -2,7 +2,7 @@
2
2
  "schema": "tiwater.text-provider-contract-manifest/v1",
3
3
  "provider": {
4
4
  "id": "@tiwater/office-mcp",
5
- "version": "0.21.47"
5
+ "version": "0.21.49"
6
6
  },
7
7
  "tools": [
8
8
  {