redact_area
Mark specific rectangular areas on PDF pages for redaction by defining coordinates, allowing precise content removal before final document saving.
Instructions
Redact a specific rectangular area on a PDF page.
This tool adds a redaction annotation for a specific rectangular area defined by coordinates. 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) page_number: Page number to redact (1-indexed) x0: Left x coordinate of the rectangle y0: Top y coordinate of the rectangle x1: Right x coordinate of the rectangle y1: Bottom y coordinate of the rectangle fill_color: RGB color tuple (0-1 range) for the redaction box. Default is black. ctx: MCP context for logging
Returns: Confirmation message
Raises: ToolError: If the PDF is not loaded, page doesn't exist, 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) | |
page_number | Yes | Page number (1-indexed) | |
pdf_path | Yes | Path to the loaded PDF file | |
x0 | Yes | Left x coordinate | |
x1 | Yes | Right x coordinate | |
y0 | Yes | Top y coordinate | |
y1 | Yes | Bottom y coordinate |