Skip to main content
Glama

Redact a PDF

redact_pdf

Permanently removes words or kinds of details (email, phone, card, date, url, iban, ssn) from a copy of the PDF, and lists every place something was removed as proof. The original is not changed. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs.

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": {
      "file": "<file>"
    },
    "name": "redact_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesOne file: file_id, url or base64. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs.
labelNoWords printed in each box, such as REDACTED.
termsNoWords or phrases to remove.
patternsNoKinds of details to remove.
matchCaseNoMatch capital letters exactly.
wholeWordNoMatch whole words only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / file / description
      Previous value: -"One file: file_id, url or base64."New value: +"One file: file_id, url or base64. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs."
    • changedInput schema / properties / file / properties / file_id / description
      Previous value: -"A file id from an earlier upload, or the id of a file attached in the chat."New value: +"A file id from an earlier upload, the upload_id from get_upload_link once the person says it is done, or the id of a file attached in the chat."
  2. Changed1 schema field changed
    • removedInput schema / properties / label / pattern
      Removed value: -"^[A-Za-z0-9 .:#()/_*[\\]-]*$"
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, and the description is consistent with that: the original is untouched and the change is permanent only in the produced copy, which explains the non-destructive hint rather than contradicting it. Beyond the annotations it discloses the returned proof-of-redaction listing and the requirement to use the person's own file, though it says nothing about job duration, failure modes, or how the proof list is formatted.

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?

Front-loaded with the core action and result, followed by the file-provenance guardrail. Four sentences, each doing work, with no filler; the only mild redundancy is restating the 'pass the person's own file' rule already present in the schema's file description.

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 six-parameter, nested-schema mutation with no output schema, the description covers the action, the copy semantics, the return value (a listing of every removal), and the file-sourcing rule. It stops short of describing the output artifact's format or how to handle partial/no-match results, which is the main remaining gap.

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%, including a detailed description of the nested file object, so the schema already carries the parameter meaning. The description names the detail categories in prose but adds no syntax, format, or interaction semantics (e.g. how terms and patterns combine, or how matchCase/wholeWord interact with patterns) beyond what the schema provides.

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

Purpose5/5

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

States a specific verb ('permanently removes') plus the resource ('a copy of the PDF') and the exact targets (words or kinds of details: email, phone, card, date, url, iban, ssn). It also declares the deliverable ('lists every place something was removed as proof'), so an agent knows both the action and the result without opening the schema.

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

Usage Guidelines4/5

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

Explicitly routes the agent: if the file cannot be passed, 'call get_upload_link or ask for an https link', naming a real sibling and the condition that selects it. It also sets a hard constraint ('Never create, rewrite, summarise or rebuild a document to stand in for theirs'), but it gives no guidance on when to choose redaction over other document operations such as ocr_pdf or compress_pdf.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources