Skip to main content
Glama

create_pdf_annotation

Add highlights or underlines to Zotero PDFs using coordinates from get_pdf_layout_text. Supports custom colors, comments, and text annotations.

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
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that this is a write operation requiring a closed Zotero and a refresh to see results, and that coordinates are from get_pdf_layout_text. No contradictions.

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?

Description is well-structured with summary, coordinate note, refresh note, warning, and parameter list. It is informative without being overly verbose; slightly more conciseness could be achieved but is already good.

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?

Given the tool complexity (7 parameters, 3 required) and no annotations, the description covers behavioral traits, parameter semantics, and side effects. Output schema exists but is not shown; description does not explain return value, but likely covered by schema.

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 description coverage, the Args section explains each parameter in detail: rects as coordinate arrays, color with hex examples, optional comment and text, and type with defaults. This adds significant meaning beyond 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?

Description clearly states the tool creates highlights/underlines on Zotero PDFs, which is specific and distinguishes it from siblings like get_pdf_layout_text (which returns coordinates) and list_annotations (which lists existing annotations).

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?

Provides context on when to use: after get_pdf_layout_text for coordinates, and includes important preconditions like closing Zotero desktop app and refreshing. Does not explicitly state when not to use, but the guidance is clear enough.

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/annota'

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