Skip to main content
Glama

find_and_attach_pdfs

Find open-access PDFs via Unpaywall for Zotero items with DOIs and attach them to your library; run in dry-run mode to preview availability without downloading.

Instructions

For each Zotero item, check Unpaywall for open access PDFs and attach them. Items must have a DOI; needs UNPAYWALL_EMAIL in the server settings. Uploads use the user's Zotero file storage; dry_run only reports what is available. Uses the same source as Zotero Desktop's 'Find Available PDFs'.

Input Schema

NameRequiredDescriptionDefault
dry_runNoOnly report which PDFs are available without downloading/attaching
item_keysNoArray of Zotero item keys to process (mutually exclusive with collection_key)
library_idNoNumeric user or group ID for this call (a group's ID is the number in its zotero.org/groups/<id> URL). Default: the configured library. Required with library_type 'group' when the server is configured for a user library.
library_typeNoLibrary for this call: 'user' (personal) or 'group'. Default: the library configured on the server.
collection_keyNoProcess all items in this collection (mutually exclusive with item_keys)
skip_if_attachment_existsNoSkip items that already have a PDF attachment

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.4
    • changedInput schema / properties / library_id / description
      Previous value: -"Override the configured library ID for this call. Defaults to ZOTERO_LIBRARY_ID env (or ZOTERO_USER_ID). Required when library_type is 'group' and the server is configured for a user library."New value: +"Numeric user or group ID for this call (a group's ID is the number in its zotero.org/groups/<id> URL). Default: the configured library. Required with library_type 'group' when the server is configured for a user library."
    • changedInput schema / properties / library_type / description
      Previous value: -"Override the configured Zotero library type for this call. Defaults to ZOTERO_LIBRARY_TYPE env (or 'user'). Use to target a different library per call without restarting the server."New value: +"Library for this call: 'user' (personal) or 'group'. Default: the library configured on the server."
  2. Changed4 schema fields changedv2.0.2
    • addedInput schema / properties / collection_key / pattern
      Added value: +"^[23456789ABCDEFGHIJKLMNPQRSTUVWXYZ]{8}$"
    • addedInput schema / properties / item_keys / items / pattern
      Added value: +"^[23456789ABCDEFGHIJKLMNPQRSTUVWXYZ]{8}$"
    • addedInput schema / properties / library_id
      Added value: +{
      +  "description": "Override the configured library ID for this call. Defaults to ZOTERO_LIBRARY_ID env (or ZOTERO_USER_ID). Required when library_type is 'group' and the server is configured for a user library.",
      +  "pattern": "^\\d+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / library_type
      Added value: +{
      +  "description": "Override the configured Zotero library type for this call. Defaults to ZOTERO_LIBRARY_TYPE env (or 'user'). Use to target a different library per call without restarting the server.",
      +  "enum": [
      +    "user",
      +    "group"
      +  ],
      +  "type": "string"
      +}
  3. First observedv1.0.9

TDQS

A4.1/5.0
Behavior4/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 well: it discloses that this is a mutating operation, that it consumes the user's Zotero file storage quota, that it requires server-side configuration, and what dry_run does. It stops short of failure semantics (what happens to items without a DOI — skipped or error?) and any rate-limit/partial-result behavior for large collections.

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 front-loaded sentences, no filler, each conveying a distinct operational fact. Minor redundancy: the dry_run explanation largely restates the schema's own description of that parameter.

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

Completeness4/5

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

Given a 6-parameter, zero-required mutation tool with no annotations and no output schema, the description covers the essentials an agent needs (source, prerequisites, storage cost, dry-run). Gaps remain around return shape and partial-failure handling, but nothing critical to invoking 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 description coverage is 100%, so the baseline is 3 — every parameter already has its own documented semantics. The description reinforces scope ('for each Zotero item', DOI requirement) and the dry_run semantics, but adds no syntax or interplay detail beyond what the schema already states.

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 ('check Unpaywall') plus the concrete side effect ('attach them') for a named resource (open access PDFs on Zotero items). This is clearly distinguishable from siblings like import_pdf_to_zotero or add_linked_url_attachment, which act on known files/URLs rather than discovering PDFs via Unpaywall.

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

Usage Guidelines4/5

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

Gives real preconditions: items must have a DOI, UNPAYWALL_EMAIL must be configured, and dry_run is the report-only mode. However, it never names an alternative tool or states when *not* to use it (e.g. when no DOIs exist, use import_pdf_to_zotero instead), and the item_keys/collection_key exclusivity is left to the schema.

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