replace_text
Replace a word or phrase everywhere in a PDF while preserving the document's embedded fonts instead of drawing an overlay. Set old/new text, page range, and whole-word or case-sensitive matching.
Instructions
Replace a word or phrase everywhere it appears, rewriting the text itself in the document's own embedded fonts (not a white box drawn on top).
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>",
"output": "<output>",
"old": "<old>",
"new": "<new>"
},
"name": "replace_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new | Yes | ||
| old | Yes | ||
| path | Yes | ||
| pages | No | ||
| output | Yes | ||
| overwrite | No | ||
| whole_word | No | ||
| case_sensitive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |