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
| Name | Required | Description | Default |
|---|---|---|---|
| attachment_key | Yes | Attachment key (e.g., "NHZFE5A7") | |
| page | Yes | For PDF: 1-indexed page number. For EPUB: 1-indexed chapter number. | |
| text | Yes | Exact text to highlight (used to find coordinates/CFI) | |
| comment | No | Optional comment on the annotation | |
| color | No | Highlight color in hex format (default: "#ffd400" yellow) | #ffd400 |
| tags | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |