scrub_pdf_metadata
Strip hidden PDF metadata and embedded scripts by rewriting a clean single-revision PDF-1.7 file, optionally removing annotations or forms while preserving page content.
Instructions
Losslessly rewrite a clean single-revision %PDF-1.7 file (collapsing multiple %%EOF saves into 1 %%EOF with a fresh xref table), stripping /Info, XMP /Metadata, /PieceInfo, /JavaScript, /OpenAction, /EmbeddedFiles, and optional /Annots or /AcroForm while preserving active vector page content.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "scrub_pdf_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | No | Local filesystem path to the source .pdf file (provide filePath or pdfBase64). | |
| pdfBase64 | No | Base64-encoded source PDF binary when scrubbing in memory. | |
| outputPath | No | Optional destination filesystem path to write the scrubbed %PDF-1.7 binary. | |
| stripAnnots | No | When true (default), removes all /Annots reviewer comments and unapplied /Redact annotations. | |
| returnBase64 | No | When true, includes the scrubbed PDF as Base64 in the JSON tool response. | |
| stripAcroForm | No | When true, removes interactive /AcroForm form dictionaries from the catalog. |