Skip to main content
Glama

Attach a file (PDF, snapshot) to an item

zotero_attach_file

Attach a PDF or other file to an existing Zotero item by supplying the parent item key and either a download URL or a local path.

Instructions

Add a stored file attachment (e.g. a PDF full text) under an existing item. Give parent (the item key) and either url (Zoteus downloads it, then stores it) or path (a file on the machine running Zoteus). filename and content_type are inferred when omitted. Saves through the Zotero desktop app when one is reachable (Zotero 10+ local API; you may be asked once to allow Zoteus write access, choose "Always Allow"), and otherwise through the cloud Web API, which needs ZOTERO_API_KEY with file access and uses your Zotero file-storage quota. url works on every setup including a remote/hosted Zoteus that cannot see your desktop, so prefer it over path unless the file really is on the server. Returns the new attachment key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL to download the file from; works on remote/hosted servers.
pathNoFilesystem path to the file, on the machine running Zoteus.
titleNoAttachment title, e.g. "Full Text PDF".
parentYesKey of the parent item to attach the file to.
filenameNoFile name to store; inferred from path/url if omitted.
library_idNoGroup library to attach in; forces the cloud path.
content_typeNoMIME type; inferred from the extension if omitted (pdf -> application/pdf).
library_typeNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changedv1.6.0
    • addedInput schema / properties / library_id
      Added value: +{
      +  "description": "Group library to attach in; forces the cloud path.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / library_type
      Added value: +{
      +  "enum": [
      +    "user",
      +    "group"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / path / description
      Previous value: -"Local filesystem path to the file."New value: +"Filesystem path to the file, on the machine running Zoteus."
    • changedInput schema / properties / url / description
      Previous value: -"URL to download the file from."New value: +"URL to download the file from; works on remote/hosted servers."
  2. Addedv1.3.1

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing that the write may route through the Zotero desktop app or cloud Web API, that the user may be prompted to allow write access, and that cloud usage requires ZOTERO_API_KEY and consumes file-storage quota. It also states the return value as the new attachment key. These are meaningful behavioral details beyond readOnlyHint/destructiveHint/openWorldHint.

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 dense but every sentence earns its place: core purpose, required parameters, parameter alternatives, storage/auth behavior, and return value. It is front-loaded with the main action and then adds necessary operational detail without fluff.

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 tool's complexity, the description covers all essential operational aspects: how to identify the parent, how to supply the file, local vs cloud routing, authentication requirements, quota implications, and the returned key. The schema covers the remaining parameter details, and the absence of an output schema is mitigated by explicitly stating the return value.

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 high at 88%, and the description still adds value by explaining the semantic difference between `url` and `path`, including remote/hosted setups, and noting that `filename` and `content_type` are inferred. It also clarifies that `library_id` forces the cloud path. This is useful guidance beyond the schema's basic descriptions.

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 opens with a specific verb and resource: 'Add a stored file attachment (e.g. a PDF full text) under an existing item.' It clearly scopes the operation as attaching to an existing item, which distinguishes it from sibling creation tools like zotero_create_items. The title and description together leave no ambiguity about what the tool does.

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?

The description provides strong usage context by explaining when to use `url` versus `path` and explicitly recommends 'prefer it over `path` unless the file really is on the server.' It also explains the local-desktop versus cloud-Web API routing, which helps an agent choose the right setup. However, it does not explicitly name sibling tools or state when not to use this tool in favor of another, so it stops short of a full 5.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oscardvs/zoteus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server