Skip to main content
Glama

Unlock PDF

unlock_pdf

Save a copy of an encrypted PDF without its password, for files you are allowed to open. Provide the current password; a wrong one returns an error and writes nothing.

Instructions

Save a copy of an encrypted PDF without its password, for a file the user is allowed to open. The current password is required; a wrong password returns an error and writes nothing. Use protect_pdf to add a password. Returns the saved path; the input is not 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": {
      "file": "<file>",
      "password": "<password>"
    },
    "name": "unlock_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesPath to the file (absolute, or relative to the working directory).
outputNoWhere to save the result. Defaults to a new file next to the input.
passwordYesThe PDF's current password.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, but the description adds genuinely new behavior: a wrong password returns an error and writes nothing, the input file is unchanged, and the tool returns the saved path. It does not say what happens if the output path already exists, which keeps it short of a 5.

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?

Four short sentences, purpose first, then requirement, error behavior, alternative, and return value. Every sentence carries information, though the alternative-pointer could have been merged with the first sentence for tighter front-loading.

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

Completeness5/5

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

For a three-parameter tool with no output schema, the description covers preconditions, failure behavior, non-mutation of the input, and the return value (the saved path). Nothing an agent needs in order to call it correctly is missing.

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 100%, so all three parameters including the output default are already documented. The description reinforces that the password is the current one and that the input is not modified, but adds no format or syntax detail beyond the schema — baseline 3 applies.

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?

The description opens with a specific verb and resource: 'Save a copy of an encrypted PDF without its password.' It also implicitly scopes the operation to decryption-only, which an agent can distinguish from protect_pdf without opening either schema.

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

Usage Guidelines5/5

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

It states the precondition ('for a file the user is allowed to open'), the requirement ('The current password is required'), and names the opposite-operation sibling explicitly: 'Use protect_pdf to add a password.' That gives clear routing in both directions.

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