redact_text
Search for and mark specific text in PDF documents for redaction by adding annotation boxes over matching content. Use with save_redacted_pdf to apply changes permanently.
Instructions
Redact specific text in a loaded PDF.
This tool searches for all instances of the specified text in the PDF and adds redaction annotations over them. The redactions are not yet applied to the document - use save_redacted_pdf to apply and save.
Args: pdf_path: Path to the PDF file (must be already loaded) text_to_redact: The text string to search for and redact fill_color: RGB color tuple (0-1 range) for the redaction box. Default is black. ctx: MCP context for logging
Returns: Summary of redaction operations
Raises: ToolError: If the PDF is not loaded or redaction fails
Input Schema
Name | Required | Description | Default |
---|---|---|---|
fill_color | No | RGB color for redaction (values 0-1). Default is black (0,0,0) | |
pdf_path | Yes | Path to the loaded PDF file | |
text_to_redact | Yes | Text string to search for and redact |