@tiwater/office-mcp 0.21.58 → 0.21.59
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_section_header_footer_references.schema.json +61 -0
- package/office/contracts/tiwater-office-provider-contract-manifest-v1.json +12 -1
- package/office/index.mjs +8 -0
- package/package.json +1 -1
- package/pdf/contracts/tiwater-pdf-provider-contract-manifest-v1.json +1 -1
- package/text/contracts/tiwater-text-provider-contract-manifest-v1.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "tiwater.office-mcp-input/docx_copy_section_header_footer_references",
|
|
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
|
+
"sourceSectionIndex": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": 0,
|
|
21
|
+
"maximum": 9007199254740991
|
|
22
|
+
},
|
|
23
|
+
"targetSectionIndex": {
|
|
24
|
+
"type": "integer",
|
|
25
|
+
"minimum": 0,
|
|
26
|
+
"maximum": 9007199254740991
|
|
27
|
+
},
|
|
28
|
+
"references": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"minItems": 1,
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"story": { "type": "string", "enum": ["header", "footer"] },
|
|
35
|
+
"type": { "type": "string", "enum": ["default", "even", "first"] }
|
|
36
|
+
},
|
|
37
|
+
"required": ["story", "type"],
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": ["sourceSectionIndex", "targetSectionIndex", "references"],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"output": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1,
|
|
49
|
+
"description": "Output DOCX path; may equal input for an atomic in-place update.",
|
|
50
|
+
"x-tiwater-file-role": "write"
|
|
51
|
+
},
|
|
52
|
+
"receiptOutput": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"x-tiwater-file-role": "write",
|
|
56
|
+
"x-tiwater-file-effect": false
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": ["input", "changes", "output", "receiptOutput"],
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
}
|
|
@@ -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.59"
|
|
6
6
|
},
|
|
7
7
|
"tools": [
|
|
8
8
|
{
|
|
@@ -49,6 +49,17 @@
|
|
|
49
49
|
"sha256": "bcad394d99a118cee1b1b5d62fc08acba2b77de27d6c29c63535049150f2016a"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
"name": "docx_copy_section_header_footer_references",
|
|
54
|
+
"providerContract": {
|
|
55
|
+
"source": "packages/docx-cli/contracts/mcp-input/docx_copy_section_header_footer_references.schema.json",
|
|
56
|
+
"sha256": "6e79dcd30c567b89241d2f72d37ac2746715a407f6251843398bdf0fba8ab803"
|
|
57
|
+
},
|
|
58
|
+
"inputContract": {
|
|
59
|
+
"path": "office/contracts/docx_copy_section_header_footer_references.schema.json",
|
|
60
|
+
"sha256": "6e79dcd30c567b89241d2f72d37ac2746715a407f6251843398bdf0fba8ab803"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
52
63
|
{
|
|
53
64
|
"name": "docx_create",
|
|
54
65
|
"providerContract": {
|
package/office/index.mjs
CHANGED
|
@@ -670,6 +670,14 @@ const tools = [
|
|
|
670
670
|
outputSchema: fixedEditOutput('docx_set_section_margins'),
|
|
671
671
|
handler: (args, tool) => fixedEdit(tool, args, docxCandidates),
|
|
672
672
|
},
|
|
673
|
+
{
|
|
674
|
+
name: 'docx_copy_section_header_footer_references',
|
|
675
|
+
effectKind: 'document-mutation',
|
|
676
|
+
description: 'Atomically copy selected default, even, or first header/footer references from one current DOCX section to another section in the same document. Sections use zero-based native document order; the referenced content remains unchanged. This does not select sections, edit header/footer content, change margins or page options, calculate layout, or decide business formatting.',
|
|
677
|
+
inputSchema: inputContract('docx_copy_section_header_footer_references'),
|
|
678
|
+
outputSchema: fixedEditOutput('docx_copy_section_header_footer_references'),
|
|
679
|
+
handler: (args, tool) => fixedEdit(tool, args, docxCandidates),
|
|
680
|
+
},
|
|
673
681
|
{
|
|
674
682
|
name: 'docx_collapse_trailing_empty_section',
|
|
675
683
|
effectKind: 'document-mutation',
|
package/package.json
CHANGED