@tiwater/office-mcp 0.17.4 → 0.17.5

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.4"
5
+ "version": "0.17.5"
6
6
  },
7
7
  "tools": [
8
8
  {
package/office/index.mjs CHANGED
@@ -168,21 +168,12 @@ const docxRevision = z.object({
168
168
  toolVersion: z.string(),
169
169
  }).strict();
170
170
 
171
- const docxTableIndexEntry = z.object({
172
- ref: z.string().regex(/^dox1_[0-9a-f]{64}$/),
173
- parentRef: z.string().regex(/^dox1_[0-9a-f]{64}$/).nullable(),
174
- storyPart: z.string(),
175
- nativePath: z.string(),
176
- rowCount: z.number().int().nonnegative(),
177
- columnCount: z.number().int().nonnegative(),
178
- textPreview: z.string(),
179
- textLength: z.number().int().nonnegative(),
180
- }).strict();
181
-
182
171
  function docxInspectionOutput(tool) {
183
172
  return artifactOutput(tool).extend({
184
173
  revision: docxRevision,
185
- tables: z.array(docxTableIndexEntry),
174
+ summary: z.object({
175
+ tableCount: z.number().int().nonnegative(),
176
+ }).strict(),
186
177
  }).strict();
187
178
  }
188
179
 
@@ -234,7 +225,7 @@ const docxReadObjectOutput = artifactOutput('docx_read_object').extend({
234
225
  const tools = [
235
226
  {
236
227
  name: 'docx_inspect',
237
- description: 'Inspect one current DOCX. The response returns its revision and a bounded table identity index for the next selection; the complete observation remains in the evidence artifact.',
228
+ description: 'Inspect one current DOCX. The response returns its revision and table count; use paged docx_find_literal or docx_list_objects to select native objects. The complete inspection remains in the evidence artifact.',
238
229
  inputSchema: inputContract('docx_inspect'),
239
230
  outputSchema: docxInspectionOutput('docx_inspect'),
240
231
  annotations: { readOnlyHint: true, idempotentHint: true },
@@ -497,11 +488,11 @@ function buildServer() {
497
488
  return server;
498
489
  }
499
490
 
500
- function compactDocxTableIndex(report) {
491
+ function compactDocxInspection(report) {
501
492
  if (!report?.revision || !Array.isArray(report.tables)) {
502
493
  throw new Error('docx-table-inspection-result-invalid');
503
494
  }
504
- return { revision: report.revision, tables: report.tables };
495
+ return { revision: report.revision, summary: { tableCount: report.tables.length } };
505
496
  }
506
497
 
507
498
  function compactDocxObjectIdentity(object) {
@@ -534,7 +525,7 @@ async function docxInspect(args) {
534
525
  runtime: commandRuntime(result),
535
526
  source: await fileArtifact(input),
536
527
  artifact: await writeJsonArtifact(requireString(args.output, 'output'), result.json),
537
- ...compactDocxTableIndex(result.json.tables),
528
+ ...compactDocxInspection(result.json.tables),
538
529
  };
539
530
  }
540
531
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiwater/office-mcp",
3
- "version": "0.17.4",
3
+ "version": "0.17.5",
4
4
  "description": "Published MCP server for Tiwater Office document capabilities",
5
5
  "type": "module",
6
6
  "license": "MIT",