Run PrivaTools File Operation
privatools_run_toolExecutes PrivaTools file and document operations on local inputs, writes binary results to disk without overwriting, and returns concise metadata or JSON responses.
Instructions
Execute any synchronous PrivaTools /api/v1/ file or document tool against local file(s) and parameters. Binary outputs are written directly to disk (without overwriting unless overwrite: true) and concise metadata + X-* headers are returned; JSON-returning tools return their JSON response directly. See the full OpenAPI specification at https://api.privatools.me/api/v1/openapi.json and MCP documentation at https://privatools.me/mcp.
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": {
"operation": "<operation>"
},
"name": "privatools_run_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | Optional operation parameters (form fields for multipart endpoints, JSON fields for JSON endpoints, or query params for GET endpoints). | |
| file_path | No | Local path to a single input file. | |
| operation | Yes | Operation slug, path, or tool alias (e.g. 'compress', 'merge', 'accessibility-check', 'view-exif', 'remove-watermark/detect'). | |
| overwrite | No | Allow replacing an existing file at output_path (default false). | |
| file_field | No | Optional multipart upload field name override (auto-detected from API schema when omitted; defaults to 'file' for file_path or 'files' for file_paths). | |
| file_paths | No | Local paths to multiple input files, in order. | |
| file_fields | No | Optional map of multipart field names to local file path(s) (string or array of strings) for tools with distinct named file inputs (e.g. { file1: 'a.pdf', file2: 'b.pdf' }). | |
| output_path | No | Optional destination file path for binary output. If omitted, output is auto-named next to the input file without overwriting existing files. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Structured JSON payload returned inline by the PrivaTools API. | |
| bytes | No | ||
| headers | Yes | Relevant X-* and HTTP response headers returned by PrivaTools. | |
| filename | No | ||
| operation | Yes | ||
| media_type | Yes | ||
| output_path | No |