wps_word_find_in_document
Find specific text in Word documents and return character positions, paragraph index, and nearby context. Read-only operation—does not replace text.
Instructions
在Word文档中查找文本并返回位置信息,不执行替换操作。
使用场景:
"找一下'项目名称'在文档的哪个位置"
"看看文档里有哪些地方需要填写"
在使用smart_fill_field之前,先用此工具定位关键字
返回信息包括:匹配文本、字符起止位置、所在段落索引、上下文(前后50字符)。 与find_replace不同,此工具仅查找不替换,返回位置信息供后续操作使用。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find_text | Yes | 要查找的文本 | |
| match_case | No | 是否区分大小写,默认false | |
| max_results | No | 最大返回结果数,默认20 | |
| match_whole_word | No | 是否全字匹配,默认false |