@tiwater/office-mcp 0.20.0 → 0.20.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.
package/office/index.mjs
CHANGED
|
@@ -286,6 +286,7 @@ const docxTableReadOutput = artifactOutput('docx_read_table').extend({
|
|
|
286
286
|
verticalMerge: z.string().nullable(),
|
|
287
287
|
verticalMergeOwner: docxAddress.nullable(),
|
|
288
288
|
text: z.string(),
|
|
289
|
+
logicalText: z.string(),
|
|
289
290
|
}).strict()),
|
|
290
291
|
}).strict()),
|
|
291
292
|
}).strict();
|
|
@@ -336,7 +337,7 @@ const tools = [
|
|
|
336
337
|
},
|
|
337
338
|
{
|
|
338
339
|
name: 'docx_read_table',
|
|
339
|
-
description: 'Read exactly one table selected from docx_table_index by native OpenXML address. Each call retains full paragraph and text-node detail for exactly the returned row page at output; it never builds another whole-table data object. The machine response is the compact form of that page: each row and cell keeps its reusable native address, grid position and span, vertical-merge owner, and
|
|
340
|
+
description: 'Read exactly one table selected from docx_table_index by native OpenXML address. Each call retains full paragraph and text-node detail for exactly the returned row page at output; it never builds another whole-table data object. The machine response is the compact form of that page: each row and cell keeps its reusable native address, grid position and span, vertical-merge owner, physical text, and logical text. In a vertical merge, restart begins one logical cell and a continue cell is not an independent row value: logicalText resolves the restart cell value while text remains the physical cell value. Process the current page before continuing once with receipt.nextOffset; never revisit an earlier offset. Use docx_read_object only when one selected object needs a narrower descendant view. The provider reports physical structure only; the Agent decides the template and business meaning.',
|
|
340
341
|
inputSchema: inputContract('docx_read_table'),
|
|
341
342
|
outputSchema: docxTableReadOutput,
|
|
342
343
|
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
@@ -730,6 +731,7 @@ async function docxObservation(tool, args) {
|
|
|
730
731
|
verticalMerge: cell.verticalMerge,
|
|
731
732
|
verticalMergeOwner: cell.verticalMergeOwner,
|
|
732
733
|
text: cell.paragraphs.map(paragraph => paragraph.text).join('\n'),
|
|
734
|
+
logicalText: cell.logicalText,
|
|
733
735
|
})),
|
|
734
736
|
};
|
|
735
737
|
const candidate = [...rows, row];
|