Skip to main content
Glama

pdf_sanitize

Sanitize PDFs by removing metadata, scripts, attachments, and thumbnails to eliminate hidden data before sharing or archiving.

Instructions

Deeply sanitizes a PDF document by removing metadata, scripts, attachments, and thumbnails. [Input: PDF (.pdf) | Output: PDF (.pdf)]

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": "<input>",
      "output": "<output>"
    },
    "name": "pdf_sanitize"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYes
outputYes
remove_scriptsNo
remove_metadataNo
remove_attachmentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the whole burden, and it does disclose the destructive effects concretely (metadata, scripts, attachments, thumbnails are stripped) plus the input/output file types. It stops short of stating whether removal is irreversible, whether the source file is modified or a new output written, or what happens to any element not listed; thumbnail removal in particular has no corresponding flag, leaving unclear whether it is always applied.

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?

Two tight sentences with the capability front-loaded and the I/O contract bracketed at the end, so an agent can scan it quickly. 'Deeply' is the only filler word and adds nothing measurable.

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

Completeness2/5

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

For a five-parameter mutation tool with zero annotation coverage, no output schema, and 0% schema description coverage, the description explains the conceptual effect but not the operational contract around the required input/output file arguments. An agent could call it, but not confidently predict file placement, overwriting, or the result of partial flag settings.

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

Parameters2/5

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

Schema coverage is 0% and the description only indirectly maps to three of the five params (remove_scripts, remove_metadata, remove_attachments) without stating defaults, mutual exclusivity, or the effect of setting them false. The two required parameters, input and output, receive no explanation at all beyond the terse bracketed type note, so path format, overwrite behavior, and whether input may equal output remain unknown.

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?

Names a specific verb (sanitize) and resource (PDF) and enumerates exactly what is removed: metadata, scripts, attachments, thumbnails. That scope implicitly separates it from sibling tools like pdf_attachments or pdf_change_permissions, but no sibling is named, so the differentiation is left to inference.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no statement of prerequisites, and no alternative named. An agent must guess that this is for security scrubbing before redistribution rather than, say, general compression (pdf_compress) or permission changes (pdf_change_permissions).

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