@tiwater/office-mcp 0.16.9 → 0.16.11
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.
package/office/README.md
CHANGED
|
@@ -43,6 +43,13 @@ DOCX mutations accept revision-bound native object references. Physical table,
|
|
|
43
43
|
row, column, paragraph, run, drawing, and body indexes are not public mutation
|
|
44
44
|
addresses.
|
|
45
45
|
|
|
46
|
+
Table-row copying is a distinct bulk table responsibility: the caller selects
|
|
47
|
+
current source and target tables, bounded row regions, excluded source rows,
|
|
48
|
+
and source/target columns. The provider expands the target region, preserves
|
|
49
|
+
target presentation, carries selected source paragraph content, and reproduces
|
|
50
|
+
the selected source row order and merge topology. It does not infer business
|
|
51
|
+
identity, language, row scope, or column meaning.
|
|
52
|
+
|
|
46
53
|
The catalog is intentionally open to new generic document capabilities, but a
|
|
47
54
|
specific workflow, template, customer, issue, input document, or model
|
|
48
55
|
difference does not justify a new tool. Add a tool only for a stable technical
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "tiwater.office-mcp-input/docx_copy_table_rows",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"targetDocument": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"input": { "type": "string", "minLength": 1, "x-tiwater-file-role": "read" },
|
|
10
|
+
"revision": { "type": "string", "pattern": "^docx-rev-v1-[0-9a-f]{64}$" }
|
|
11
|
+
},
|
|
12
|
+
"required": ["input", "revision"],
|
|
13
|
+
"additionalProperties": false
|
|
14
|
+
},
|
|
15
|
+
"changes": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"targetTableRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
22
|
+
"targetRows": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"description": "Complete target data-row range to replace. Exclude every header row, including continuation rows in a multi-row header; the range cannot start or end inside a vertical merge.",
|
|
25
|
+
"properties": {
|
|
26
|
+
"firstRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
27
|
+
"lastRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" }
|
|
28
|
+
},
|
|
29
|
+
"required": ["firstRef", "lastRef"],
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
},
|
|
32
|
+
"sourceDocument": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"input": { "type": "string", "minLength": 1, "x-tiwater-file-role": "read" },
|
|
36
|
+
"revision": { "type": "string", "pattern": "^docx-rev-v1-[0-9a-f]{64}$" }
|
|
37
|
+
},
|
|
38
|
+
"required": ["input", "revision"],
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
},
|
|
41
|
+
"sourceTableRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
42
|
+
"sourceRows": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "Contiguous source business-row range. Do not begin on an unlabeled continuation row from an excluded business group. If another column's visible merge began before the range, the provider carries its origin value into a new merge start.",
|
|
45
|
+
"properties": {
|
|
46
|
+
"firstRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
47
|
+
"lastRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
48
|
+
"excludeRefs": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": ["firstRef", "lastRef"],
|
|
54
|
+
"additionalProperties": false
|
|
55
|
+
},
|
|
56
|
+
"columns": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"minItems": 1,
|
|
59
|
+
"description": "One mapping per logical header cell. A header cell owns its full OpenXML gridSpan; do not add separate mappings for physical grid columns inside that span.",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"sourceHeaderRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
64
|
+
"targetHeaderRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
65
|
+
"content": { "type": "string", "enum": ["all-paragraphs", "first-paragraph"] }
|
|
66
|
+
},
|
|
67
|
+
"required": ["sourceHeaderRef", "targetHeaderRef", "content"],
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": ["targetTableRef", "targetRows", "sourceDocument", "sourceTableRef", "sourceRows", "columns"],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"output": { "type": "string", "minLength": 1, "x-tiwater-file-role": "write" },
|
|
77
|
+
"receiptOutput": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1,
|
|
80
|
+
"x-tiwater-file-role": "write",
|
|
81
|
+
"x-tiwater-file-effect": false
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": ["targetDocument", "changes", "output", "receiptOutput"],
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
}
|
|
@@ -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.16.
|
|
5
|
+
"version": "0.16.11"
|
|
6
6
|
},
|
|
7
7
|
"tools": [
|
|
8
8
|
{
|
|
@@ -38,6 +38,17 @@
|
|
|
38
38
|
"sha256": "5f0bfc826d68f451055aba20390686e0e0df2182797fc36ff285f42d09084104"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
+
{
|
|
42
|
+
"name": "docx_copy_table_rows",
|
|
43
|
+
"providerContract": {
|
|
44
|
+
"source": "packages/docx-cli/contracts/mcp-input/docx_copy_table_rows.schema.json",
|
|
45
|
+
"sha256": "f24924a80de9d9cfe619c9b4f6475d370c75fe221dcbe3af9692ad15c648d3b0"
|
|
46
|
+
},
|
|
47
|
+
"inputContract": {
|
|
48
|
+
"path": "office/contracts/docx_copy_table_rows.schema.json",
|
|
49
|
+
"sha256": "f24924a80de9d9cfe619c9b4f6475d370c75fe221dcbe3af9692ad15c648d3b0"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
41
52
|
{
|
|
42
53
|
"name": "docx_delete_object",
|
|
43
54
|
"providerContract": {
|
package/office/index.mjs
CHANGED
|
@@ -212,6 +212,13 @@ const tools = [
|
|
|
212
212
|
outputSchema: fixedEditOutput('docx_copy_content'),
|
|
213
213
|
handler: args => fixedEdit('docx_copy_content', args),
|
|
214
214
|
},
|
|
215
|
+
{
|
|
216
|
+
name: 'docx_copy_table_rows',
|
|
217
|
+
description: 'Create a new DOCX by replacing selected target table row ranges with selected source rows, using explicit source-to-target header cell mappings while retaining target presentation.',
|
|
218
|
+
inputSchema: inputContract('docx_copy_table_rows'),
|
|
219
|
+
outputSchema: fixedEditOutput('docx_copy_table_rows'),
|
|
220
|
+
handler: args => fixedEdit('docx_copy_table_rows', args),
|
|
221
|
+
},
|
|
215
222
|
{
|
|
216
223
|
name: 'docx_copy_object',
|
|
217
224
|
description: 'Create a new output by copying targetDocument and applying one or more selected-object insertions under selected target parent objects.',
|