Skip to main content
Glama

import_pdf_to_zotero

Download a PDF from a direct URL and store it in Zotero as an imported attachment, making its full text searchable via fulltext indexing. Use when the PDF needs to be indexed in Zotero.

Instructions

Download a PDF from a URL and upload it to Zotero storage as an imported_url attachment. Unlike linked URL attachments, imported files are stored in Zotero's storage and become fulltext-indexed (searchable via get_item_fulltext). Use this when you need the PDF content to be indexed by Zotero. The URL must lead straight to the PDF file (no login, paywall or HTML landing page); files up to 100 MB, counted against the user's Zotero file storage. For items with a DOI, find_and_attach_pdfs finds open-access PDFs by itself.

Input Schema

NameRequiredDescriptionDefault
urlYesURL of the PDF to download and import
tagsNoTags to apply to the attachment
titleNoDisplay title for the attachment (default: filename)
filenameNoFilename for the attachment (default: extracted from URL or document.pdf)
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.
collectionsNoCollection keys (only used for standalone attachments, ignored when parent_item is set)
parent_itemNoItem key of the parent item. If provided, the attachment becomes a child of that item.
content_typeNoMIME type recorded on the attachment (default: "application/pdf"). This tool imports PDFs only: the downloaded file must start with %PDF- or the import is rejected, whatever this value says. Full text is extracted only for "application/pdf".application/pdf
library_typeNoLibrary for this call: 'user' (personal) or 'group'. Default: the library configured on the server.

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. Changed5 schema fields changedv2.0.2
    • addedInput schema / properties / collections / items / pattern
      Added value: +"^[23456789ABCDEFGHIJKLMNPQRSTUVWXYZ]{8}$"
    • changedInput schema / properties / content_type / description
      Previous value: -"MIME type of the file (default: \"application/pdf\")"New value: +"MIME type recorded on the attachment (default: \"application/pdf\"). This tool imports PDFs only: the downloaded file must start with %PDF- or the import is rejected, whatever this value says. Full text is extracted only for \"application/pdf\"."
    • 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"
      +}
    • addedInput schema / properties / parent_item / pattern
      Added value: +"^[23456789ABCDEFGHIJKLMNPQRSTUVWXYZ]{8}$"
  3. First observedv1.0.9

TDQS

A4.4/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 discloses key behavior: imported files are stored in Zotero storage, become fulltext-indexed, count against storage quota, and must be PDFs up to 100 MB. It does not cover auth requirements, duplicate handling, or error responses beyond PDF validation, so it is strong but not exhaustive.

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 front-loaded with purpose, then alternates, usage condition, constraints, and a final routing note. Every sentence adds useful information and nothing is redundant.

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?

For a nine-parameter tool with no annotations and no output schema, the description covers purpose, storage/indexing implications, size limits, URL requirements, and alternatives well. It omits return-value or error-shape details, which keeps it just short of fully complete.

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 schema already documents all nine parameters. The description adds no parameter-level detail beyond the URL constraint and therefore matches the baseline for a fully documented schema.

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: download a PDF and upload it to Zotero storage as an imported_url attachment. It explicitly distinguishes imported attachments from linked URL attachments and names find_and_attach_pdfs as the alternative for DOI-based workflows.

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?

Directly says when to use it ("Use this when you need the PDF content to be indexed by Zotero") and gives clear exclusions and preconditions: no login, paywall, or HTML landing page. It also routes DOI-based cases to find_and_attach_pdfs.

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