@tiwater/office-mcp 0.17.0 → 0.17.1

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.
@@ -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.17.0"
5
+ "version": "0.17.1"
6
6
  },
7
7
  "tools": [
8
8
  {
package/office/index.mjs CHANGED
@@ -198,6 +198,7 @@ const docxObjectIdentity = z.object({
198
198
  const docxReadObjectOutput = artifactOutput('docx_read_object').extend({
199
199
  revision: docxRevision,
200
200
  object: docxObjectIdentity,
201
+ objects: z.array(docxObjectIdentity).min(1),
201
202
  }).strict();
202
203
 
203
204
  const tools = [
@@ -225,7 +226,7 @@ const tools = [
225
226
  },
226
227
  {
227
228
  name: 'docx_read_object',
228
- description: 'Read one selected native DOCX object as an ordered native hierarchy written to the requested output artifact. The tool response only identifies that artifact and the selected root object; read the artifact for descendant refs and content. For a table, request row and cell once. Add paragraph for whole-paragraph choices; add run and text for exact content selections.',
229
+ description: 'Read one selected native DOCX object. The response returns the selected root and requested descendants as ordered object identities for the next operation; the complete hierarchy remains in the evidence artifact. For a table, request row, cell, and paragraph once when row bounds, header columns, and paragraph choices are all needed.',
229
230
  inputSchema: inputContract('docx_read_object'),
230
231
  outputSchema: docxReadObjectOutput,
231
232
  annotations: { readOnlyHint: true, idempotentHint: true },
@@ -482,6 +483,17 @@ function compactDocxObjectIdentity(object) {
482
483
  };
483
484
  }
484
485
 
486
+ function compactDocxObservationObjects(observation) {
487
+ const objects = [];
488
+ function visit(node) {
489
+ if (!node?.object) return;
490
+ objects.push(compactDocxObjectIdentity(node.object));
491
+ for (const child of node.children ?? []) visit(child);
492
+ }
493
+ visit(observation);
494
+ return objects;
495
+ }
496
+
485
497
  async function docxInspect(args) {
486
498
  const input = path.resolve(requireString(args.input, 'input'));
487
499
  const result = await runJsonCandidateChain(docxCandidates, ['inspect', input, '--json']);
@@ -514,6 +526,7 @@ async function docxReadObject(args) {
514
526
  artifact: await writeJsonArtifact(output, result.json),
515
527
  revision: result.json.receipt.revision,
516
528
  object: compactDocxObjectIdentity(result.json.observation.object),
529
+ objects: compactDocxObservationObjects(result.json.observation),
517
530
  };
518
531
  });
519
532
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiwater/office-mcp",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Published MCP server for Tiwater Office document capabilities",
5
5
  "type": "module",
6
6
  "license": "MIT",