Skip to main content
Glama

Zotero Create Annotation

zotero_create_annotation

Adds highlights, underlines, area boxes, or sticky notes to Zotero PDFs and EPUBs by attachment key and page, using exact text, normalized rectangle, or note coordinates.

Instructions

Annotate a PDF (EPUB: highlights and underlines only). One mode per call: text= highlights that exact text (underline=True underlines it), matched against the text layer (scanned PDFs will not match); rect=[x, y, width, height] draws an area box over a figure or table; note=[x, y] places a sticky note at that point, its text in comment. rect and note are PDF only, normalized 0-1 from the page's top-left: take boxes from zotero_get_page_layout instead of guessing. attachment_key: the attachment, NOT the parent item (zotero_get_item_children lists it). page: 1-indexed (EPUB: chapter). comment, color (hex, default '#ffd400') and tags are optional. Needs PyMuPDF (the [pdf] extra). Example: (attachment_key='NHZFE5A7', page=7, rect=[0.15, 0.22, 0.6, 0.35], comment='Figure 3').

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "attachment_key": "<attachment_key>",
      "page": "<page>"
    },
    "name": "zotero_create_annotation"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNo
pageYes
rectNo
tagsNo
textNo
colorNo#ffd400
commentNo
underlineNo
attachment_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses the PyMuPDF/[pdf] dependency, the text-layer matching limitation for scanned PDFs, EPUB format restrictions, and mode exclusivity. It does not mention whether local write authorization is required (a zotero_authorize_local_writes sibling exists) or what the call returns, leaving those gaps.

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?

Content is front-loaded with the mode distinction and nothing is padding, but the single semicolon-chained paragraph is dense and the parenthetical asides interrupt the flow. A short mode list would scan faster, though the trailing example is a useful anchor.

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 9-parameter mutation tool with no annotations and no output schema, the description covers modes, coordinate systems, indexing, defaults, and dependencies thoroughly. The remaining omission is the write-authorization prerequisite and any note about the created annotation's identifier being returned.

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 0%, yet the description defines all nine parameters: text/underline, rect and note coordinate formats, comment, color with its hex default, tags, attachment_key (explicitly the attachment, not the parent item), and page indexing. It adds semantics the schema cannot convey, such as 0-1 normalization from the page's top-left and 1-indexed pages.

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?

Opens with a specific verb and resource ('Annotate a PDF') and immediately enumerates the three mutually exclusive modes (text, rect, note). This is clearly distinguishable from siblings like zotero_get_annotations, zotero_update_annotation, and zotero_delete_annotation.

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?

Explicitly states 'One mode per call', constrains rect/note to PDF only, warns that text matching fails on scanned PDFs, and redirects the agent to zotero_get_page_layout for boxes rather than guessing coordinates. It also tells the agent where to obtain attachment_key via zotero_get_item_children, covering the main selection pitfalls.

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