Skip to main content
Glama

pdf_check_access

Check a PDF's encryption and permissions to determine if it is locked and what actions it permits: printing, copying, or editing. Reports restrictions as the author's intent.

Instructions

Check a PDF's encryption and what it permits: printing, copying, editing.

Answers "is this locked, and what am I allowed to do with it?".

encrypted and needs_password are separate answers and the difference matters: most encrypted files have no user password, so they open silently and only carry restrictions. permissions gives a boolean per action, restrictions lists what is denied, and an unencrypted file permits everything — a PDF has nowhere to keep restrictions but its encryption dictionary.

Treat restrictions as what the file asks of viewers, not as enforcement: once a document is open nothing stops the bits being ignored, and a file that denies copying still yields its text to pdf_extract_text. Report them as the author's intent, never as an action being impossible.

Worth reaching for when another tool reports a file as encrypted; this one still answers, since the encryption dictionary is readable when the pages are not.

Args: ref: PDF file path, or a workspace artifact id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly. It explains the distinct meanings of encrypted and needs_password, defines permissions vs. restrictions, covers the unencrypted case, and clarifies that restrictions are statements of intent rather than enforced barriers. It also notes that it can answer even when pages cannot be read.

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?

The description is longer than average but every section earns its place: purpose, key distinctions, interpretation guidance, and when-to-use context. The main purpose is front-loaded in the first two sentences, and the argument documentation is cleanly separated at the end.

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?

Given the conceptual complexity of PDF encryption, the description is complete. It explains edge cases, defines the output semantics without relying on the output schema, gives usage context relative to other tools, and documents the single parameter. Nothing an agent needs to decide whether and how to call this tool is missing.

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

Parameters5/5

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

The input schema only describes ref as a string with no explanation, and schema coverage is 0%. The description compensates fully by stating 'ref: PDF file path, or a workspace artifact id,' which gives the agent the two acceptable forms of the argument. This is exactly the guidance the schema lacks.

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 states a specific action and resource: 'Check a PDF's encryption and what it permits: printing, copying, editing.' It also gives the core question it answers, 'is this locked, and what am I allowed to do with it?', which clearly separates it from metadata or text extraction siblings. The nuance about encrypted vs. needs_password further sharpens its identity.

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 explicitly says when to reach for this tool: when another tool reports a file as encrypted, this one still works because the encryption dictionary is readable. It also connects to pdf_extract_text to warn that denied permissions are not enforcement, teaching the agent how to use the result correctly in a multi-tool workflow.

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