replace_text
Replace text in Word documents with track changes, allowing reviewers to accept or reject each modification via Word's revision interface.
Instructions
以修订模式(Track Changes)替换文档中的文本。
修改不会直接生效,而是写成 Word 修订(删除线 + 下划线),由用户在 Word 审阅界面逐条接受/拒绝。old_text 在全文只出现一次时才会替换;出现多次时 需提供更长的唯一上下文,或明确 replace_all=True 全部替换。 new_text 传空字符串表示纯删除。
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>",
"old_text": "<old_text>",
"new_text": "<new_text>"
},
"name": "replace_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| author | No | AI 律师助手 | |
| new_text | Yes | ||
| old_text | Yes | ||
| replace_all | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |