Skip to main content
Glama
54yyyu
by 54yyyu

zotero_create_annotation

Add highlights or area annotations to PDF/EPUB attachments. Specify exact text for highlighting or a normalized rectangle for figures, with optional comments, colors, and tags.

Instructions

Create an annotation on a PDF attachment (EPUB: highlights only). Exactly one of two modes per call: text= HIGHLIGHTS selectable text; rect= draws an AREA box over a figure, table, or other non-text region (PDF only). Passing both or neither is an error. attachment_key: the PDF/EPUB attachment key, NOT the parent item key (zotero_get_item_children finds it). page: 1-indexed page (EPUB: 1-indexed chapter). text: exact text to highlight, matched against the text layer — scanned/image-only PDFs will not match. rect: [x, y, width, height] normalized to [0, 1], with (0, 0) at the page's top-left; width/height are page-relative and the box must fit the page. Call zotero_get_page_layout first and reuse a detected region's bbox instead of guessing coordinates. comment, color (hex, default '#ffd400'), tags: optional. Requires PyMuPDF (the [pdf] extra) and a writable library (web API key or hybrid mode). Examples: (attachment_key='NHZFE5A7', page=4, text='working memory'); (attachment_key='NHZFE5A7', page=7, rect=[0.15, 0.22, 0.6, 0.35], comment='Figure 3').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYes
rectNo
tagsNo
textNo
colorNo#ffd400
commentNo
attachment_keyYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A5/5.0
Behavior5/5

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

No annotations are present, but the description carries that burden well: it discloses scanned/image-only PDF matching failures, coordinate-system origin and normalization, PDF vs. EPUB behavior, 1-indexed page/chapter semantics, and the PyMuPDF/writable-library requirement. These behavioral facts add critical context not discoverable from the schema.

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?

The description is dense yet well organized: purpose and mode rules first, then key conventions, prerequisites, requirements, and concrete examples. Every sentence carries operational information, with no filler or unnecessary repetition of schema data.

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 no annotations and 0% schema description coverage, this definition covers all essential usage knowledge: mode selection, error conditions, coordinate semantics, matching limitations, dependencies, and examples. Since an output schema exists, omitting return-value details is acceptable.

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%, and the description fully compensates by explaining attachment_key vs. parent key, page indexing, exact text matching against the text layer, and rect as normalized [x, y, width, height] with origin and fit constraints. It also adds useful context for optional parameters like color default, comment, and tags.

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 description opens with 'Create an annotation on a PDF attachment,' giving a specific verb and resource that clearly distinguishes it from update/delete/get annotation tools. It also differentiates the two modes (text highlight vs. rect area box) and the EPUB/PDF constraints, so an agent knows exactly what the tool is for.

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?

The description explicitly states when each mode applies, warns that passing both or neither text and rect is an error, and directs the agent to companion tools for prerequisites (zotero_get_item_children to find attachment_key, zotero_get_page_layout before choosing rect coordinates). This provides actionable when-to-use guidance beyond a generic summary.

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

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