Compress & Optimize PDF
pdf_compressReduce local PDF file size with object stream compaction or Ghostscript DPI presets, and optionally save the compressed PDF to a chosen output path.
Instructions
Compress a local PDF file using object stream compaction (always available) or Ghostscript DPI optimization when Ghostscript is installed locally.
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": {
"inputPath": "<inputPath>"
},
"name": "pdf_compress"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preset | No | "structural" rewrites clean compressed streams; "ebook"/"screen"/"printer" use local Ghostscript if installed | structural |
| inputPath | Yes | Local PDF file path | |
| outputPath | No | Optional compressed PDF path |