Skip to main content
Glama

pdf_check_access

Check a PDF's encryption and permissions to see whether it needs a password and what printing, copying, or editing actions are allowed.

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

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: it distinguishes encrypted vs needs_password, explains that most encrypted files open silently, and warns that restrictions are authorial intent rather than enforcement and can be bypassed. That caveat is exactly the kind of non-obvious behavior an agent would otherwise get wrong.

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 question and organized into short, purposeful paragraphs. The closing caveat is slightly redundant ('Treat restrictions as what the file asks of viewers, not as enforcement' is restated as 'Report them as the author's intent, never as an action being impossible'), costing a little tightness.

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 one-parameter read tool with an output schema, nothing needed is missing: usage conditions, the meaning of each returned field (permissions, restrictions, encrypted, needs_password), and the interpretation caveat are all present. An agent can call and interpret this correctly without further context.

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

Parameters4/5

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

Schema coverage is 0% (the single `ref` property has no description), so the description compensates by defining it as 'PDF file path, or a workspace artifact id.' That resolves the main ambiguity — the accepted value forms — though it does not cover edge cases like relative vs absolute paths.

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 and resource ('Check a PDF's encryption and what it permits: printing, copying, editing') and frames the question it answers. It also implicitly differentiates from siblings by naming pdf_extract_text and by calling out the encrypted-file case that other tools cannot handle.

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?

Explicitly says when to reach for it: 'when another tool reports a file as encrypted; this one still answers.' It also gives the complementary case (unencrypted files permit everything) so the agent knows what result to expect in each branch.

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