@tiwater/office-mcp 0.16.12 → 0.16.13

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.
@@ -17,6 +17,24 @@
17
17
  "type": "string",
18
18
  "pattern": "^docx-rev-v1-[0-9a-f]{64}$"
19
19
  },
20
+ "kinds": {
21
+ "description": "Object kinds required by the next operation. The response returns only matching descendant identities; the artifact retains the complete object.",
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string",
25
+ "enum": [
26
+ "paragraph",
27
+ "table",
28
+ "gridColumn",
29
+ "row",
30
+ "cell",
31
+ "run",
32
+ "text",
33
+ "drawing"
34
+ ]
35
+ },
36
+ "minItems": 1
37
+ },
20
38
  "output": {
21
39
  "type": "string",
22
40
  "minLength": 1,
@@ -27,6 +45,7 @@
27
45
  "required": [
28
46
  "input",
29
47
  "ref",
48
+ "kinds",
30
49
  "output"
31
50
  ],
32
51
  "additionalProperties": false,
@@ -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.12"
5
+ "version": "0.16.13"
6
6
  },
7
7
  "tools": [
8
8
  {
@@ -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": "ed4068627fe84872fb8d15d57d5950a22d03e79b4bb11cbc376a8d8b84cee0c0"
122
+ "sha256": "d75d81f6ec62ed40e6116beacc1860b692e0307dc0da09f05599511816aa38ab"
123
123
  },
124
124
  "inputContract": {
125
125
  "path": "office/contracts/docx_read_object.schema.json",
126
- "sha256": "ed4068627fe84872fb8d15d57d5950a22d03e79b4bb11cbc376a8d8b84cee0c0"
126
+ "sha256": "d75d81f6ec62ed40e6116beacc1860b692e0307dc0da09f05599511816aa38ab"
127
127
  }
128
128
  },
129
129
  {
package/office/index.mjs CHANGED
@@ -199,7 +199,7 @@ const tools = [
199
199
  },
200
200
  {
201
201
  name: 'docx_read_object',
202
- description: 'Read one selected native DOCX object. The response returns that object and every descendant identity for the next operation; full Open XML remains in the evidence artifact.',
202
+ description: 'Read one selected native DOCX object. Declare only the descendant kinds required by the next operation; the response returns those identities and the evidence artifact retains the complete object.',
203
203
  inputSchema: inputContract('docx_read_object'),
204
204
  outputSchema: docxReadObjectOutput,
205
205
  annotations: { readOnlyHint: true, idempotentHint: true },
@@ -462,6 +462,7 @@ async function docxObservation(tool, args) {
462
462
  async function docxReadObject(args) {
463
463
  const input = path.resolve(requireString(args.input, 'input'));
464
464
  const output = requireString(args.output, 'output');
465
+ const kinds = new Set(args.kinds);
465
466
  const { output: _output, ...request } = args;
466
467
  return withTempJsonFile(request, async requestPath => {
467
468
  const result = await runJsonCandidateChain(docxCandidates, ['docx_read_object', requestPath]);
@@ -472,7 +473,9 @@ async function docxReadObject(args) {
472
473
  artifact: await writeJsonArtifact(output, result.json),
473
474
  revision: result.json.receipt.revision,
474
475
  object: compactDocxObjectIdentity(result.json.observation.object),
475
- descendants: result.json.observation.descendants.map(compactDocxObjectIdentity),
476
+ descendants: result.json.observation.descendants
477
+ .filter(identity => kinds.has(identity.kind))
478
+ .map(compactDocxObjectIdentity),
476
479
  };
477
480
  });
478
481
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiwater/office-mcp",
3
- "version": "0.16.12",
3
+ "version": "0.16.13",
4
4
  "description": "Published MCP server for Tiwater Office document capabilities",
5
5
  "type": "module",
6
6
  "license": "MIT",