@tiwater/office-mcp 0.21.15 → 0.21.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.
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "tiwater.office-mcp-input/docx_fill_table_from_table",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"input": { "type": "string", "minLength": 1, "description": "Current target DOCX.", "x-tiwater-file-role": "read" },
|
|
7
|
+
"table": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
11
|
+
"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]*\\])*$" }
|
|
12
|
+
},
|
|
13
|
+
"required": ["part", "path"],
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"description": "Current target table address returned by docx_read_table or docx_table_index."
|
|
16
|
+
},
|
|
17
|
+
"existingRows": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"first": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
24
|
+
"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]*\\])*$" }
|
|
25
|
+
},
|
|
26
|
+
"required": ["part", "path"],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
},
|
|
29
|
+
"last": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
33
|
+
"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]*\\])*$" }
|
|
34
|
+
},
|
|
35
|
+
"required": ["part", "path"],
|
|
36
|
+
"additionalProperties": false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": ["first", "last"],
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"description": "Exact contiguous current target row range to replace; it must enclose every vertical merge it intersects."
|
|
42
|
+
},
|
|
43
|
+
"prototypeRow": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"properties": {
|
|
46
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
47
|
+
"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]*\\])*$" }
|
|
48
|
+
},
|
|
49
|
+
"required": ["part", "path"],
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"description": "One current row inside existingRows whose cell formatting is reused for every generated body row."
|
|
52
|
+
},
|
|
53
|
+
"sourceInput": { "type": "string", "minLength": 1, "description": "Current source DOCX.", "x-tiwater-file-role": "read" },
|
|
54
|
+
"sourceTable": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
58
|
+
"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]*\\])*$" }
|
|
59
|
+
},
|
|
60
|
+
"required": ["part", "path"],
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"description": "Current source table address returned by docx_read_table or docx_table_index."
|
|
63
|
+
},
|
|
64
|
+
"sourceRows": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"first": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
71
|
+
"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]*\\])*$" }
|
|
72
|
+
},
|
|
73
|
+
"required": ["part", "path"],
|
|
74
|
+
"additionalProperties": false
|
|
75
|
+
},
|
|
76
|
+
"last": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
80
|
+
"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]*\\])*$" }
|
|
81
|
+
},
|
|
82
|
+
"required": ["part", "path"],
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": ["first", "last"],
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"description": "Exact contiguous source data-row range; it must enclose every vertical merge it intersects."
|
|
89
|
+
},
|
|
90
|
+
"sourceRecordColumn": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
94
|
+
"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]*\\])*$" }
|
|
95
|
+
},
|
|
96
|
+
"required": ["part", "path"],
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"description": "Source grid-column address whose native vertical-merge owners define consecutive logical records. An unmerged cell defines one record."
|
|
99
|
+
},
|
|
100
|
+
"columnMappings": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"minItems": 1,
|
|
103
|
+
"description": "Complete source-to-target grid-column projection. Multiple adjacent source columns may compose one target cell. One source column may spread its logical values across several prototype cells. Composition and spreading cannot occur in the same mapping. Target columns that belong to one prototype cell remain one cell, and unused trailing spread cells stay blank.",
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"sourceColumns": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"minItems": 1,
|
|
110
|
+
"description": "One or more contiguous source grid columns in native order. Multiple columns compose one target cell; a source cell spanning several selected columns contributes once.",
|
|
111
|
+
"items": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"properties": {
|
|
114
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
115
|
+
"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]*\\])*$" }
|
|
116
|
+
},
|
|
117
|
+
"required": ["part", "path"],
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"targetColumns": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"minItems": 1,
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"part": { "type": "string", "minLength": 1, "pattern": "^\\/" },
|
|
128
|
+
"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]*\\])*$" }
|
|
129
|
+
},
|
|
130
|
+
"required": ["part", "path"],
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"joinWith": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "Separator used when sourceColumns compose one target cell. Defaults to a newline. It does not apply when one source column spreads across multiple target cells."
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"required": ["sourceColumns", "targetColumns"],
|
|
140
|
+
"additionalProperties": false
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"output": { "type": "string", "minLength": 1, "description": "Output DOCX path; may equal input for one atomic in-place update.", "x-tiwater-file-role": "write" },
|
|
144
|
+
"receiptOutput": { "type": "string", "minLength": 1, "x-tiwater-file-role": "write", "x-tiwater-file-effect": false }
|
|
145
|
+
},
|
|
146
|
+
"required": ["input", "table", "existingRows", "prototypeRow", "sourceInput", "sourceTable", "sourceRows", "sourceRecordColumn", "columnMappings", "output", "receiptOutput"],
|
|
147
|
+
"additionalProperties": false
|
|
148
|
+
}
|
|
@@ -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.
|
|
5
|
+
"version": "0.21.17"
|
|
6
6
|
},
|
|
7
7
|
"tools": [
|
|
8
8
|
{
|
|
@@ -82,6 +82,17 @@
|
|
|
82
82
|
"sha256": "0556937d649a1248947019f23c005786046f576e64a844f057745933f5821cd7"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
+
{
|
|
86
|
+
"name": "docx_fill_table_from_table",
|
|
87
|
+
"providerContract": {
|
|
88
|
+
"source": "packages/docx-cli/contracts/mcp-input/docx_fill_table_from_table.schema.json",
|
|
89
|
+
"sha256": "473b4e8ac319c0edcf481fa8c2167ea9b1c340995311ca662e34f493772a0de4"
|
|
90
|
+
},
|
|
91
|
+
"inputContract": {
|
|
92
|
+
"path": "office/contracts/docx_fill_table_from_table.schema.json",
|
|
93
|
+
"sha256": "473b4e8ac319c0edcf481fa8c2167ea9b1c340995311ca662e34f493772a0de4"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
85
96
|
{
|
|
86
97
|
"name": "docx_insert_objects",
|
|
87
98
|
"providerContract": {
|
package/office/index.mjs
CHANGED
|
@@ -429,6 +429,13 @@ const tools = [
|
|
|
429
429
|
outputSchema: fixedEditOutput('docx_set_table_body'),
|
|
430
430
|
handler: args => fixedEdit('docx_set_table_body', args),
|
|
431
431
|
},
|
|
432
|
+
{
|
|
433
|
+
name: 'docx_fill_table_from_table',
|
|
434
|
+
description: 'Fill one current target-table body from one current source-table row range. Select the source grid column whose native vertical merges define logical records, then map source grid columns onto the target prototype cells. Target columns belonging to one prototype cell retain that horizontal span; multiple prototype cells receive source values in row order. The provider derives output rows and vertical merges, validates the complete target grid, commits once, and returns structural readback. It does not choose source or target business meaning, filter records, translate or rewrite text, or apply business-specific rules.',
|
|
435
|
+
inputSchema: inputContract('docx_fill_table_from_table'),
|
|
436
|
+
outputSchema: fixedEditOutput('docx_fill_table_from_table'),
|
|
437
|
+
handler: args => fixedEdit('docx_fill_table_from_table', args),
|
|
438
|
+
},
|
|
432
439
|
{
|
|
433
440
|
name: 'docx_insert_objects',
|
|
434
441
|
description: 'Insert selected current DOCX objects under an existing parent. Table rows are objects: expand a target table by copying one contiguous observed row range and use repeat for count; sourceInput may equal input. A row range beginning with vertical-merge continuations may be inserted only inside a target boundary with the same active grid spans, which extends those merges. Individual table cells are not raw insertion targets because that would bypass the table grid.',
|