Skip to main content
Glama

create_pdf_annotation

Create highlights or underlines on Zotero PDFs with coordinates, color, and optional comments. Coordinates must come from get_pdf_layout_text.

Instructions

在 Zotero PDF 上创建高亮/下划线批注。

坐标使用 get_pdf_layout_text 返回的 rect 值,无需手动转换。 写入后需重启 Zotero 或按 Ctrl+Shift+R 刷新才能看到批注。

注意:写操作需要关闭 Zotero 桌面应用,否则会因数据库锁而失败。

Args: item_id: Zotero PDF 附件的 itemID(数字),或 PDF 文件的绝对路径 page_index: 页码(从 0 开始) rects: 坐标数组,每项为 [x0, y0, x1, y1](来自 get_pdf_layout_text) color: 十六进制颜色,如 "#ffd400"(黄), "#28CA42"(绿), "#2EA8E5"(蓝) comment: 附加在批注上的文字评论(可选) text: 被高亮的原始文本(可选,用于 Zotero 中显示) type: 批注类型: "highlight"(默认) 或 "underline"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYes
page_indexYes
rectsYes
colorNo#ffd400
commentNo
textNo
typeNohighlight

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully carries the burden. It discloses important behaviors: the operation modifies the PDF, requires a refresh/restart to become visible, and necessitates closing Zotero during write. This goes well beyond basic functionality.

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?

The description is well-structured with a clear purpose first, then usage notes, then parameter list. It is somewhat lengthy due to detailed parameter explanations, but every sentence adds value. A slight trim could improve conciseness.

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?

The description covers the prerequisite (get_pdf_layout_text), the operation, and post-operation steps (restart/refresh). It also warns about the database lock. However, it does not describe the output or error handling, though an output schema exists.

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?

Despite 0% schema coverage, the description explains each parameter in detail, adding meaning: item_id can be ID or path, rects come from get_pdf_layout_text, color with examples, and type default. This provides crucial guidance missing from the schema.

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 clearly states it creates highlight/underline annotations on Zotero PDFs. The verb 'create' and resource 'annotation' are specific, and it distinguishes from sibling tools like list_annotations or get_pdf_layout_text.

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?

The description provides explicit context: coordinates should come from get_pdf_layout_text, and it warns about needing to restart or refresh after writing. It also advises closing Zotero to avoid database lock. However, it does not compare with batch_annotate or specify when not to use this tool.

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

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