pdf_compress
Create a smaller PDF copy by recompressing content streams and removing duplicate objects without re-encoding images; writes a new file and avoids overwriting by default.
Instructions
Write a smaller copy of a PDF. Lossless: it recompresses content streams and removes duplicate objects; images are not re-encoded. Writes one new file; never overwrites unless overwrite=true.
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": {
"input_path": "<input_path>",
"output_path": "<output_path>"
},
"name": "pdf_compress"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| overwrite | No | ||
| input_path | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | ||
| output_path | Yes | ||
| output_bytes | Yes | ||
| original_bytes | Yes | ||
| savings_percent | Yes | Negative when the copy is larger than the input. |