@tiwater/office-mcp 0.18.8 → 0.18.9
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/index.mjs
CHANGED
|
@@ -225,6 +225,16 @@ const docxTableIndexOutput = artifactOutput('docx_table_index').extend({
|
|
|
225
225
|
columnCount: z.number().int().nonnegative(),
|
|
226
226
|
textPreview: z.string(),
|
|
227
227
|
textLength: z.number().int().nonnegative(),
|
|
228
|
+
precedingParagraph: z.object({
|
|
229
|
+
address: docxAddress,
|
|
230
|
+
textPreview: z.string(),
|
|
231
|
+
textLength: z.number().int().nonnegative(),
|
|
232
|
+
}).strict().nullable(),
|
|
233
|
+
followingParagraph: z.object({
|
|
234
|
+
address: docxAddress,
|
|
235
|
+
textPreview: z.string(),
|
|
236
|
+
textLength: z.number().int().nonnegative(),
|
|
237
|
+
}).strict().nullable(),
|
|
228
238
|
}).strict()),
|
|
229
239
|
}).strict();
|
|
230
240
|
|
|
@@ -233,6 +243,16 @@ const docxTableReadOutput = artifactOutput('docx_read_table').extend({
|
|
|
233
243
|
address: docxAddress,
|
|
234
244
|
rowCount: z.number().int().nonnegative(),
|
|
235
245
|
columnCount: z.number().int().nonnegative(),
|
|
246
|
+
precedingParagraph: z.object({
|
|
247
|
+
address: docxAddress,
|
|
248
|
+
textPreview: z.string(),
|
|
249
|
+
textLength: z.number().int().nonnegative(),
|
|
250
|
+
}).strict().nullable(),
|
|
251
|
+
followingParagraph: z.object({
|
|
252
|
+
address: docxAddress,
|
|
253
|
+
textPreview: z.string(),
|
|
254
|
+
textLength: z.number().int().nonnegative(),
|
|
255
|
+
}).strict().nullable(),
|
|
236
256
|
rows: z.array(z.object({
|
|
237
257
|
address: docxAddress,
|
|
238
258
|
gridBefore: z.number().int().nonnegative(),
|
|
@@ -276,7 +296,7 @@ const tools = [
|
|
|
276
296
|
},
|
|
277
297
|
{
|
|
278
298
|
name: 'docx_table_index',
|
|
279
|
-
description: 'Locate tables in one current DOCX. Returns one compact index containing every table address, shape,
|
|
299
|
+
description: 'Locate tables in one current DOCX. Returns one compact index containing every table address, shape, short text preview, and the nearest non-empty paragraph before and after each table. Choose the needed address from this index, then call docx_read_table. It does not return full cell content or decide table semantics.',
|
|
280
300
|
inputSchema: inputContract('docx_table_index'),
|
|
281
301
|
outputSchema: docxTableIndexOutput,
|
|
282
302
|
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
@@ -292,7 +312,7 @@ const tools = [
|
|
|
292
312
|
},
|
|
293
313
|
{
|
|
294
314
|
name: 'docx_read_table',
|
|
295
|
-
description: 'Read exactly one table selected from docx_table_index by native OpenXML address. Returns its rows, cells, spans, vertical merges, paragraphs, text nodes, and reusable addresses in document order. It does not locate a table or decide business meaning.',
|
|
315
|
+
description: 'Read exactly one table selected from docx_table_index by native OpenXML address. Returns its nearest non-empty paragraph before and after the table, rows, cells, spans, vertical merges, paragraphs, text nodes, and reusable addresses in document order. It does not locate a table or decide business meaning.',
|
|
296
316
|
inputSchema: inputContract('docx_read_table'),
|
|
297
317
|
outputSchema: docxTableReadOutput,
|
|
298
318
|
annotations: { readOnlyHint: true, idempotentHint: true },
|