Skip to main content
Glama

get_pdf_layout_text

Extract text and physical coordinates from a PDF page in Zotero. Returns each text line with its bounding box for precise annotation placement.

Instructions

提取 PDF 指定页面的文本及物理坐标。

返回 JSON,每个文本行包含 text 和 rect [x0, y0, x1, y1](Zotero PDF 坐标系)。 可以直接将 rect 传给 create_pdf_annotation 使用。

Args: item_id: Zotero PDF 附件的 itemID(数字),或 PDF 文件的绝对路径 page_number: 页码(从 0 开始)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYes
page_numberYes

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 return format (JSON with text and rect), coordinate system, and parameter details. Lacks info on error handling or side effects, but overall transparent.

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 concise but includes an Args section that partly repeats schema info. However, it adds value (type clarifications) and is well-structured in front-loaded style.

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?

Given the tool's low complexity (2 params, clear output described), the description covers essential aspects: input, output format, and usage hint. No critical gaps.

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%, so description adds crucial meaning: item_id can be numeric Zotero itemID or file path, page_number is 0-indexed. This fully compensates for schema's lack of description.

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 it extracts text and physical coordinates from a specified PDF page, with a specific verb 'extract' and resource 'PDF page'. It distinguishes itself from siblings like get_pdf_text_bulk and create_pdf_annotation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Mentions that rect can be used with create_pdf_annotation, implying a use case, but does not explicitly state when not to use or compare to alternatives like get_pdf_text_bulk.

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