PapermarkDocs

Agent workflows

Patterns for driving Papermark from an agent — MCP tools and CLI Skills.

The reusable patterns that show up when an LLM is your client. Tested with Claude (Desktop, Code, .ai) and ChatGPT.

Pattern 1: "Find then act"

The agent often needs to resolve a fuzzy human reference ("the Q4 deck") to a concrete ID before doing anything. Two-tool dance:

search_documents("Q4 pitch deck") → get id
create_link({documentId: id, …})  → return URL

Prompt that works well:

Find the Q4 pitch deck and create a password-protected share link that expires in two weeks.

The agent picks search_documents for the resolution, picks the top match (or asks if there are multiple), then calls create_link with the right shape. If the search returns nothing, the agent falls back to list_documents to enumerate.

Pattern 2: "Aggregate then drill in"

Start with totals, then dig into one entry. Three tools chained:

get_document_analytics(doc) → get list of links from totals shape
list_links({documentId: doc}) → enumerate links
list_link_views(top link) → per-viewer detail

Prompt:

How is the investor memo performing? Show overall stats, then tell me who from Acme has been spending the most time on it.

The agent batches the calls — analytics for the document, then links, then per-link views, then filters by Acme email and sorts by duration.

Pattern 3: "Sync from another source"

Agent reads from one place, writes to Papermark. Best with Claude Code (filesystem) or Claude Desktop with file attachments.

Prompt:

Sync every PDF in ~/Drive/Acme/ into a Papermark dataroom called "Acme — current". Create the dataroom if it doesn't exist; skip files that are already there.

The agent: list_datarooms to check existence, create_dataroom if needed, list_dataroom_documents to see what's already in, upload_document per missing file. Idempotent — safe to re-run.

Pattern 4: "Audit"

Agent walks every dataroom and reports what's stale, who has access, which links are open.

Prompt:

Audit my Papermark account. List every dataroom, the documents in each, the links that exist, and whether any links are missing passwords or expiry dates.

The agent: list_datarooms → for each: list_dataroom_documents + list_links filtered by dataroomId → flags any link without password or expiresAt set.

Useful as a quarterly hygiene pass.

Pattern 5: "Workflow orchestration"

Agent chains Papermark with other tools (email, Slack, calendar).

Prompt (Claude Desktop with Slack MCP installed):

When someone from acme.com views the investor memo, post a notification in #deal-acme.

Caveat: this is polling, not push — the agent has to check on a schedule (or the user has to ask). Real push notifications need webhooks. For now, set the agent up to check once a day:

Every morning at 9, list new views on the investor memo from acme.com and post them to #deal-acme.

Most agent runtimes support scheduled / recurring prompts — it's a client-side feature, not Papermark's.

Anti-patterns

Don't ask the agent to delete things in bulk. Even when the token has the scopes, mistakes are unrecoverable. Use the dashboard or the CLI for destructive ops.

Don't expose write tokens to general-purpose agents. If you're running a long-lived assistant ("my personal Claude"), point it at a *.read-only token. Mint write tokens scoped per-task and revoke when done.

Don't trust the agent's pagination. If you ask "list every view," the agent may stop at the first page. Either say "list every view, paginate if needed" explicitly or use the CLI / API for exhaustive enumeration.

Picking your transport

You're using…Recommended setup
Claude Desktop on a laptopMCP stdio — full 18 tools incl. file uploads
Claude Code in a terminalMCP stdio — best for shell + Papermark workflows
claude.ai in a browserMCP HTTP via Connectors — 17 tools, no upload
ChatGPTMCP HTTP via Apps — 17 tools, no upload
Anything elseCLI shelled out from your scripts

On this page