Skip to main content
Glama

Run PrivaTools File Operation

privatools_run_tool

Executes 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

NameRequiredDescriptionDefault
paramsNoOptional operation parameters (form fields for multipart endpoints, JSON fields for JSON endpoints, or query params for GET endpoints).
file_pathNoLocal path to a single input file.
operationYesOperation slug, path, or tool alias (e.g. 'compress', 'merge', 'accessibility-check', 'view-exif', 'remove-watermark/detect').
overwriteNoAllow replacing an existing file at output_path (default false).
file_fieldNoOptional multipart upload field name override (auto-detected from API schema when omitted; defaults to 'file' for file_path or 'files' for file_paths).
file_pathsNoLocal paths to multiple input files, in order.
file_fieldsNoOptional 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_pathNoOptional destination file path for binary output. If omitted, output is auto-named next to the input file without overwriting existing files.

Output Schema

NameRequiredDescriptionDefault
okYes
dataNoStructured JSON payload returned inline by the PrivaTools API.
bytesNo
headersYesRelevant X-* and HTTP response headers returned by PrivaTools.
filenameNo
operationYes
media_typeYes
output_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false), the description discloses real behavior: binary results are written to disk, existing files are not replaced unless overwrite:true, and responses include concise metadata plus X-* headers while JSON tools pass through their payload. It stops short of covering auth needs, rate limits, or failure modes for arbitrary operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core action, followed by output behavior and then reference links — no filler. The middle sentence is dense with semicolon-separated clauses but still parseable, and the doc links are justified given the open-ended operation space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a generic dispatcher with 8 parameters, a required free-form operation slug, and an output schema, the description covers output routing, overwrite safety, and where to find the per-operation contract. The main remaining gap is not directing the agent to privatools_describe_tool for discovering valid operation slugs, relying instead on an external URL.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains operation, params, file_path(s), file_field(s), output_path, and overwrite, making a baseline 3 appropriate. The description reinforces the overwrite behavior and output-writing semantics but adds no new meaning about the free-form operation slug format or how params vary per endpoint.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a concrete verb ('Execute') and resource ('any synchronous PrivaTools /api/v1/<operation> file or document tool'), so an agent knows exactly what class of action this performs. The word 'synchronous' implicitly separates it from the async job siblings (submit_job, job_status), but no sibling is named explicitly, which keeps it short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: 'synchronous' hints that long-running work should go through the job tools, but the description never says when to use this versus privatools_submit_job or privatools_describe_tool. It compensates partially by pointing to the OpenAPI spec and MCP docs for operation discovery, but no explicit exclusions or preconditions are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.