@tiwater/office-mcp 0.16.15 → 0.16.17
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/contracts/docx_copy_content.schema.json +12 -2
- package/office/contracts/docx_copy_table_rows.schema.json +5 -1
- package/office/contracts/docx_read_object.schema.json +1 -1
- package/office/contracts/tiwater-office-provider-contract-manifest-v1.json +7 -7
- package/office/index.mjs +3 -3
- package/package.json +1 -1
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
"items": {
|
|
19
19
|
"type": "object",
|
|
20
20
|
"properties": {
|
|
21
|
-
"targetRef": {
|
|
21
|
+
"targetRef": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^dox1_[0-9a-f]{64}$",
|
|
24
|
+
"description": "Target cell ref whose content is replaced while its cell formatting is retained."
|
|
25
|
+
},
|
|
22
26
|
"sourceDocument": {
|
|
23
27
|
"type": "object",
|
|
24
28
|
"properties": {
|
|
@@ -31,12 +35,18 @@
|
|
|
31
35
|
"sourceSelections": {
|
|
32
36
|
"type": "array",
|
|
33
37
|
"minItems": 1,
|
|
38
|
+
"description": "Ordered source content copied into the target cell. Select a whole observed object by ref alone, or select an exact substring by adding range to an observed run or text ref. Multiple selections are copied in this array order.",
|
|
34
39
|
"items": {
|
|
35
40
|
"type": "object",
|
|
36
41
|
"properties": {
|
|
37
|
-
"ref": {
|
|
42
|
+
"ref": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^dox1_[0-9a-f]{64}$",
|
|
45
|
+
"description": "Observed source object ref. When range is present this must be a run or text ref, not a paragraph, cell, row, or table ref."
|
|
46
|
+
},
|
|
38
47
|
"range": {
|
|
39
48
|
"type": "object",
|
|
49
|
+
"description": "Zero-based substring within the selected run or text object. Omit range to copy the whole selected object.",
|
|
40
50
|
"properties": {
|
|
41
51
|
"start": { "type": "integer", "minimum": 0, "maximum": 2147483647 },
|
|
42
52
|
"length": { "type": "integer", "exclusiveMinimum": 0, "maximum": 2147483647 }
|
|
@@ -58,7 +58,11 @@
|
|
|
58
58
|
"properties": {
|
|
59
59
|
"sourceHeaderRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
60
60
|
"targetHeaderRef": { "type": "string", "pattern": "^dox1_[0-9a-f]{64}$" },
|
|
61
|
-
"content": {
|
|
61
|
+
"content": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"enum": ["all-paragraphs", "first-paragraph"],
|
|
64
|
+
"description": "Content copied from each mapped source cell. all-paragraphs preserves every source paragraph in order. first-paragraph copies only the first source paragraph. Before choosing first-paragraph, read the selected source table with docx_read_object kinds row, cell, and paragraph to prove later paragraphs are intentionally omitted."
|
|
65
|
+
}
|
|
62
66
|
},
|
|
63
67
|
"required": ["sourceHeaderRef", "targetHeaderRef", "content"],
|
|
64
68
|
"additionalProperties": false
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"pattern": "^docx-rev-v1-[0-9a-f]{64}$"
|
|
19
19
|
},
|
|
20
20
|
"kinds": {
|
|
21
|
-
"description": "Object kinds required by the next operation. Both the response and artifact contain only matching descendant identities.",
|
|
21
|
+
"description": "Object kinds required by the next operation. Both the response and artifact contain only matching descendant identities. Include paragraph whenever paragraph boundaries affect a later content selection such as docx_copy_table_rows first-paragraph versus all-paragraphs.",
|
|
22
22
|
"type": "array",
|
|
23
23
|
"items": {
|
|
24
24
|
"type": "string",
|
|
@@ -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.17"
|
|
6
6
|
},
|
|
7
7
|
"tools": [
|
|
8
8
|
{
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"name": "docx_copy_content",
|
|
21
21
|
"providerContract": {
|
|
22
22
|
"source": "packages/docx-cli/contracts/mcp-input/docx_copy_content.schema.json",
|
|
23
|
-
"sha256": "
|
|
23
|
+
"sha256": "27110c4590087bb38bd08f77ab2dc19a62407a836f58a603d222ebdb184c97b6"
|
|
24
24
|
},
|
|
25
25
|
"inputContract": {
|
|
26
26
|
"path": "office/contracts/docx_copy_content.schema.json",
|
|
27
|
-
"sha256": "
|
|
27
|
+
"sha256": "27110c4590087bb38bd08f77ab2dc19a62407a836f58a603d222ebdb184c97b6"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"name": "docx_copy_table_rows",
|
|
43
43
|
"providerContract": {
|
|
44
44
|
"source": "packages/docx-cli/contracts/mcp-input/docx_copy_table_rows.schema.json",
|
|
45
|
-
"sha256": "
|
|
45
|
+
"sha256": "a246ed7a97fce47ab0cde6f6ad9c97a2936a775d8b390b4ad807c1dff5720fb7"
|
|
46
46
|
},
|
|
47
47
|
"inputContract": {
|
|
48
48
|
"path": "office/contracts/docx_copy_table_rows.schema.json",
|
|
49
|
-
"sha256": "
|
|
49
|
+
"sha256": "a246ed7a97fce47ab0cde6f6ad9c97a2936a775d8b390b4ad807c1dff5720fb7"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
"name": "docx_read_object",
|
|
120
120
|
"providerContract": {
|
|
121
121
|
"source": "packages/docx-cli/contracts/mcp-input/docx_read_object.schema.json",
|
|
122
|
-
"sha256": "
|
|
122
|
+
"sha256": "29ba026050f1120219491f918e74c344551224795b1d15e49ec886d4e81e092a"
|
|
123
123
|
},
|
|
124
124
|
"inputContract": {
|
|
125
125
|
"path": "office/contracts/docx_read_object.schema.json",
|
|
126
|
-
"sha256": "
|
|
126
|
+
"sha256": "29ba026050f1120219491f918e74c344551224795b1d15e49ec886d4e81e092a"
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
{
|
package/office/index.mjs
CHANGED
|
@@ -206,7 +206,7 @@ const tools = [
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
name: 'docx_read_object',
|
|
209
|
-
description: 'Read one selected native DOCX object as an ordered native hierarchy. For a table, request row and cell kinds once; each row contains its ordered cells with text, grid span, and vertical merge state.',
|
|
209
|
+
description: 'Read one selected native DOCX object as an ordered native hierarchy. For a table, request row and cell kinds once; each row contains its ordered cells with text, grid span, and vertical merge state. Also request paragraph when paragraph boundaries determine what a later copy operation must retain.',
|
|
210
210
|
inputSchema: inputContract('docx_read_object'),
|
|
211
211
|
outputSchema: docxReadObjectOutput,
|
|
212
212
|
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
@@ -214,14 +214,14 @@ const tools = [
|
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
name: 'docx_copy_content',
|
|
217
|
-
description: '
|
|
217
|
+
description: 'Replace content in existing target cells while retaining target cell formatting and source inline meaning. Use this directly or after docx_copy_table_rows when a target cell needs an exact observed subset of source content. A source selection copies a whole object by ref, or an exact substring when range is attached to a run or text ref.',
|
|
218
218
|
inputSchema: inputContract('docx_copy_content'),
|
|
219
219
|
outputSchema: fixedEditOutput('docx_copy_content'),
|
|
220
220
|
handler: args => fixedEdit('docx_copy_content', args),
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
name: 'docx_copy_table_rows',
|
|
224
|
-
description: 'Populate existing target tables by replacing selected data-row ranges with selected source rows. Use this whenever the target table already exists; explicit header-cell mappings preserve target presentation and native source grouping even when source and target grid spans differ.',
|
|
224
|
+
description: 'Populate existing target tables by replacing selected data-row ranges with selected source rows. Use this whenever the target table already exists; explicit header-cell mappings preserve target presentation and native source grouping even when source and target grid spans differ. Each column must explicitly copy all source-cell paragraphs or only the first; inspect paragraph children before choosing.',
|
|
225
225
|
inputSchema: inputContract('docx_copy_table_rows'),
|
|
226
226
|
outputSchema: fixedEditOutput('docx_copy_table_rows'),
|
|
227
227
|
handler: args => fixedEdit('docx_copy_table_rows', args),
|