find_replace
Find and replace plain text in .docx files, including table cells, with case-insensitive matching by default. Returns matched, replaced, and location counts.
Instructions
在 docx 文档中全文查找并替换字符串(普通字符串,非正则;匹配范围含表格内单元格)。match_case=false 时大小写不敏感,替换文本原样插入。返回 {matched, replaced, locations}。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"find": "<find>",
"replace": "<replace>"
},
"name": "find_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | 要查找的原文(普通字符串,非正则) | |
| path | Yes | 目标 .docx 文档绝对路径 | |
| replace | Yes | 替换为的内容 | |
| match_case | No | 是否大小写敏感,默认 false | |
| session_id | No | (建议)标注会话 ID(wait_for_annotations 返回)。窗口重载精确绑定该会话 |