Skip to main content
Glama

zotero_create_annotation

Add text-highlight annotations to PDF or EPUB attachments in your Zotero library. Requires exact text, page number, and attachment key. Optionally include comments and tags.

Instructions

Create a TEXT-HIGHLIGHT annotation on a PDF or EPUB attachment, with optional comment and tags. For rectangular selections of figures or non-text regions, use zotero_create_area_annotation instead. attachment_key: the PDF/EPUB attachment key — NOT the parent item key (use zotero_get_item_children to find attachments). page: 1-indexed page number (page 1 is the first page). text: exact text to highlight; the tool locates and rectangles it on the page via the PDF/EPUB text layer — scanned/image-only PDFs will not match. color: hex color (default '#ffd400' yellow). comment: optional note attached to the highlight. tags: optional list of tag strings to apply to the annotation. Requires PyMuPDF (pip install zotero-mcp-server[pdf]) and a writable library (web API key or hybrid mode). Example: zotero_create_annotation(attachment_key='NHZFE5A7', page=4, text='mindfulness-based therapy', comment='definition to cite').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attachment_keyYesAttachment key (e.g., "NHZFE5A7")
pageYesFor PDF: 1-indexed page number. For EPUB: 1-indexed chapter number.
textYesExact text to highlight (used to find coordinates/CFI)
commentNoOptional comment on the annotation
colorNoHighlight color in hex format (default: "#ffd400" yellow)#ffd400
tagsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, description carries full burden. It discloses requirements (PyMuPDF, writable library), explains that text must exist in the text layer (scanned PDFs won't work), and how coordinates are derived. Lacks details on error behavior (e.g., text not found) but is otherwise thorough.

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?

Well-structured with main purpose first, then differentiator, parameter details, requirements, and example. Slightly verbose in repeating schema descriptions but every sentence earns its place.

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?

Covers purpose, when to use, parameters, prerequisites, and provides an example. Output schema exists so return values are not needed. Missing error handling details (e.g., if text not found) but still quite complete for a creation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is high (all params described), but description adds critical context: attachment_key is NOT the parent key, page indexing differs for PDF vs EPUB, and text is exact for coordinate lookup. Example further clarifies usage.

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?

Description clearly states it creates a TEXT-HIGHLIGHT annotation on PDF/EPUB attachments, explicitly distinguishing from the sibling tool zotero_create_area_annotation for rectangular selections. The verb 'create', resource 'annotation', and type 'text-highlight' are all precise.

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?

Provides explicit when-to-use (for text highlights) and when-not-to-use (for rectangular selections, use area annotation). Also includes prerequisites (PyMuPDF, writable library) and guidance on finding attachment keys via zotero_get_item_children.

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

Install Server

Other Tools

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/54yyyu/zotero-mcp'

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