Skip to main content
Glama

Lock, unlock or flatten a PDF

protect_pdf

lock: add a password needed to open it. unlock: remove a password you know. flatten: burn form fields and annotations into the page so they can't be changed.

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": "protect_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoA file the person attached in ChatGPT (filled in by ChatGPT).
file_idNoA FynePDF file_id from upload_file, import_file_from_url or an earlier tool.
file_urlNoA public link to the file.
passwordNo
operationYes
library_file_idNoA file from the person's FynePDF Library (from list_library_files).

Output Schema

NameRequiredDescriptionDefault
cardNo
filesYes
stepsYes
job_idYes
statusYes
creditsYes
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • removedOutput schema / properties / files / items / properties / bytes / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / files / items / properties / bytes / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / files / items / properties / download_url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / files / items / properties / download_url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / files / items / properties / pages / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / files / items / properties / pages / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / steps / items / properties / bytes_after / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / steps / items / properties / bytes_after / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / steps / items / properties / bytes_before / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / steps / items / properties / bytes_before / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / steps / items / properties / pages_after / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / steps / items / properties / pages_after / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / steps / items / properties / pages_before / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / steps / items / properties / pages_before / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The description adds real behavioral detail beyond the annotations: it explains that flatten permanently removes the ability to edit fields and annotations, and that unlock requires existing knowledge of the password. Annotations declare destructiveHint=false without saying whether the original file is overwritten or a new file is produced, and the description does not close that gap either. The 'can't be changed' wording is useful context even if it sits near the destructiveHint=false declaration.

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

Conciseness5/5

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

Three tight clauses, one per operation, with the operation name front-loading each clause. No filler and no restatement of the title.

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

Completeness3/5

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

An output schema exists and annotations cover the safety profile, so return values need no explanation. However, for a tool with four different ways to supply an input file and a password parameter that only applies to two of three operations, the description should state which inputs combine and whether the source file is modified in place.

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 coverage is 67%, and the description's main contribution is explaining the three enum values for 'operation', which the schema lists but does not define. It says nothing about the password parameter's relationship to lock versus unlock, nor about the three mutually exclusive file input routes (file object, file_id, file_url, library_file_id).

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 gives a concrete verb-plus-resource for each of the three modes: locking adds an open password, unlocking removes a known password, and flattening bakes form fields and annotations into the page. An agent can immediately tell what each operation produces. It stops short of naming how this differs from adjacent tools like sign_pdf or redact_pdf, which also touch PDF security/content.

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 implied per mode — 'unlock' explicitly requires a password you already know, which signals a prerequisite. There is no explicit guidance on when to pick this over redact_pdf (removing sensitive content) or sign_pdf (adding a signature), and no statement that flatten is one-way, which is the key decision criterion.

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.