Skip to main content
Glama
Zotero MCP
by 54yyyu

Zotero Create Annotation

zotero_create_annotation

Annotate Zotero PDFs or EPUBs by highlighting text, underlining, drawing area boxes, or placing sticky notes with comments and tags.

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. Changed5 schema fields changedv0.17.3
    • removedInput schema / properties / comment / default
      Removed value: -null
    • removedInput schema / properties / note / default
      Removed value: -null
    • removedInput schema / properties / rect / default
      Removed value: -null
    • removedInput schema / properties / tags / default
      Removed value: -null
    • removedInput schema / properties / text / default
      Removed value: -null
  2. Changed11 schema fields changedv0.16.0
    • removedInput schema / properties / comment / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / comment / type
      Added value: +"string"
    • changedInput schema / properties / note / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "number"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / rect / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "number"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / tags / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / tags / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / tags / type
      Added value: +"array"
    • removedInput schema / properties / text / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / text / type
      Added value: +"string"
    • addedInput schema / properties / underline
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "type": "object",
      -  "x-fastmcp-wrap-result": true
      -}New value: +null
  3. Changed1 schema field changedv0.13.1
    • addedInput schema / properties / note
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  4. Changed1 schema field changedv0.11.0
    • changedInput schema / properties / rect / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "number"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  5. Changed10 schema fields changedv0.9.0
    • removedInput schema / properties / attachment_key / description
      Removed value: -"Attachment key (e.g., \"NHZFE5A7\")"
    • removedInput schema / properties / color / description
      Removed value: -"Highlight color in hex format (default: \"#ffd400\" yellow)"
    • removedInput schema / properties / comment / description
      Removed value: -"Optional comment on the annotation"
    • removedInput schema / properties / page / description
      Removed value: -"For PDF: 1-indexed page number. For EPUB: 1-indexed chapter number."
    • addedInput schema / properties / rect
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / text / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / text / default
      Added value: +null
    • removedInput schema / properties / text / description
      Removed value: -"Exact text to highlight (used to find coordinates/CFI)"
    • removedInput schema / properties / text / type
      Removed value: -"string"
    • changedInput schema / required
      Previous value: -[
      -  "attachment_key",
      -  "page",
      -  "text"
      -]New value: +[
      +  "attachment_key",
      +  "page"
      +]
  6. Addedv0.4.1

TDQS

A4.5/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 failure modes (scanned PDFs will not match the text layer), format limits (EPUB only supports highlights/underlines), a runtime dependency (needs PyMuPDF / the [pdf] extra), and coordinate conventions (normalized 0-1 from page top-left, page 1-indexed). What it omits is any statement about write authorization or library context for what is a mutating operation.

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?

Front-loaded with the purpose and then organized mode-by-mode, with no filler sentences and a concrete worked example at the end. It is written as a dense semicolon-chained block rather than scannable structure, which costs some readability for an otherwise efficient ~130 words.

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 9-parameter mutation tool with no annotations and no output schema, the definition covers everything needed to call it correctly: mode selection, coordinate derivation, attachment/page identification, format limits, dependency requirements, and a fully populated example call. An agent could invoke this without consulting any other field.

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 description coverage is 0%, so the description must carry all nine parameters, and it does: text, underline, rect, note, comment, color, tags, attachment_key, and page are each given meaning. Crucially it disambiguates the confusing parts the schema leaves opaque — rect is [x, y, width, height] while note is a bare [x, y] point whose text goes in comment, color defaults to hex '#ffd400', and page is 1-indexed.

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+resource ("Annotate a PDF") and immediately enumerates the three mutually exclusive modes (text, rect, note), so an agent knows exactly what the tool does and which shape of call it is making. It is clearly differentiated from siblings like zotero_get_page_layout (used to source coordinates) and zotero_get_item_children (used to source the attachment_key).

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?

States the key operational constraint "One mode per call" and routes the agent to zotero_get_page_layout rather than guessing box coordinates, and to zotero_get_item_children for the attachment_key. It also scopes format applicability (rect/note are PDF only, EPUB limited to highlights/underlines). It does not explicitly say when to use this versus zotero_update_annotation or how write authorization factors in, leaving a small gap.

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