@tiwater/office-mcp 0.16.9 → 0.16.10
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,83 @@
|
|
|
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
|
+
"properties": {
|
|
25
|
+
"firstRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
26
|
+
"lastRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" }
|
|
27
|
+
},
|
|
28
|
+
"required": ["firstRef", "lastRef"],
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
},
|
|
31
|
+
"sourceDocument": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"input": { "type": "string", "minLength": 1, "x-tiwater-file-role": "read" },
|
|
35
|
+
"revision": { "type": "string", "pattern": "^docx-rev-v1-[0-9a-f]{64}$" }
|
|
36
|
+
},
|
|
37
|
+
"required": ["input", "revision"],
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
},
|
|
40
|
+
"sourceTableRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
41
|
+
"sourceRows": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"firstRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
45
|
+
"lastRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
46
|
+
"excludeRefs": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": ["firstRef", "lastRef"],
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
},
|
|
54
|
+
"columns": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"minItems": 1,
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"sourceHeaderRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
61
|
+
"targetHeaderRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
62
|
+
"content": { "type": "string", "enum": ["all-paragraphs", "first-paragraph"] }
|
|
63
|
+
},
|
|
64
|
+
"required": ["sourceHeaderRef", "targetHeaderRef", "content"],
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": ["targetTableRef", "targetRows", "sourceDocument", "sourceTableRef", "sourceRows", "columns"],
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"output": { "type": "string", "minLength": 1, "x-tiwater-file-role": "write" },
|
|
74
|
+
"receiptOutput": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1,
|
|
77
|
+
"x-tiwater-file-role": "write",
|
|
78
|
+
"x-tiwater-file-effect": false
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": ["targetDocument", "changes", "output", "receiptOutput"],
|
|
82
|
+
"additionalProperties": false
|
|
83
|
+
}
|
|
@@ -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.10"
|
|
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": "1698ca119543d17b954ce1cfeaf31f536a98da23cc90c9120cfd3d1d74093706"
|
|
46
|
+
},
|
|
47
|
+
"inputContract": {
|
|
48
|
+
"path": "office/contracts/docx_copy_table_rows.schema.json",
|
|
49
|
+
"sha256": "1698ca119543d17b954ce1cfeaf31f536a98da23cc90c9120cfd3d1d74093706"
|
|
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.',
|