Skip to main content
Glama

Attach a local file

zotero_attach_file

Attach a local file to a Zotero item or create a standalone attachment. Choose linked mode to store just the path, or imported mode to copy the file into Zotero for syncing.

Instructions

Attach a file from disk to a Zotero item, or add it as a standalone attachment. mode="linked" (default) records the path only: instant for any file size, but the file must stay put and the attachment does not sync to zotero.org. mode="imported" copies the file into Zotero's storage, so it syncs and survives the original being moved. Group libraries accept only "imported", since a local path means nothing to other members. filePath must be absolute. Pass parentItemKey to hang the file off an existing reference; omit it for a standalone attachment, optionally filed into collections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo"linked" stores the path only (instant, no copy, no sync); "imported" copies the file into Zotero (syncs).linked
tagsNoTags to attach.
titleNoAttachment title shown in Zotero. Defaults to the file name.
groupIdNoGroup library ID. Omit for the personal library ("My Library"), which is what almost every request wants. Group IDs come from zotero_list_libraries.
filePathYesAbsolute path to the file on this machine, e.g. "/Users/me/papers/smith-2024.pdf".
collectionsNoCollections to file the attachment into. Only valid for standalone attachments (no parentItemKey).
parentItemKeyNoItem this file belongs to. Omit to create a standalone attachment item.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
bytesYes
filePathYes
uploadedYesTrue when file bytes were transferred; false for linked files and deduplicated uploads.
attachmentYes
contentTypeYes
attachmentKeyYes

Schema Changelog

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

  1. First observedv1.0.1

TDQS

A4.7/5.0
Behavior5/5

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

With annotations carrying no meaningful hints, the description carries the full behavioral burden and does it well: linked mode records only a path and won't sync, imported mode copies into storage and syncs, and group libraries reject linked mode because a local path is meaningless to other members. It also warns that filePath must be absolute and that linked attachments depend on the file staying put.

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?

Four dense sentences, each earning its place: purpose, mode trade-offs, group-library constraint, and filePath/parentItemKey guidance. The most decision-relevant information is front-loaded, with no filler or repetition.

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 7-parameter tool with an output schema, the description covers all the non-obvious call decisions: mode selection, the group-library restriction, the absolute-path requirement, and the attached-vs-standalone distinction. Any remaining details like return values or parameter patterns are handled by the output schema and input schema.

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 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it elaborates the linked vs imported trade-offs, clarifies that filePath must be absolute, and explains how parentItemKey/collections produce child vs standalone attachments. It does not add semantic detail for tags or title, but those are already adequately documented in the 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?

The opening sentence names a specific operation with a clear verb and resource: 'Attach a file from disk to a Zotero item, or add it as a standalone attachment.' The description further distinguishes the two attachment forms (linked vs imported, child vs standalone), so an agent can tell this apart from siblings like zotero_create_items or zotero_get_attachment_path.

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?

It gives strong usage context: mode choice depends on whether the file must stay put or sync, and group libraries force 'imported' mode, which is an explicit constraint. It also tells the agent when to pass parentItemKey versus omit it for standalone attachments. It does not explicitly name alternative tools, so it stops just short of full when/when-not guidance.

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/dvdsosa/zotero-native-mcp'

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