Skip to main content
Glama

convert_pdf

Detect text layer in PDF and convert each page to an image for multimodal question splitting. Supports custom DPI and page limits.

Instructions

PDF → 文字层检测 + 按页转图(多模态拆题的原料)。确定性 pymupdf,非 OCR。

🔴 拆题一律以页图多模态直读为准(H1a:文字层公式不可信);text_layer 仅辅助(题号定位/纯文字题)。 参数: pdf_path 绝对路径;batch 页图文件名前缀(空=文件名主干);dpi 渲染精度(170 实测够);max_pages 限页(0=全部)。 返回: {ok, page_count, has_text_layer, pages:[页图路径...], text_layer_path?}。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNo
batchNo
pdf_pathYes
max_pagesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description fully carries the burden. It discloses non-OCR deterministic behavior, warns about text layer unreliability, and briefly describes return format. No mention of auth or side effects, but unlikely needed for a conversion tool.

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 extremely concise: two short paragraphs, first states purpose and key caveat, second lists parameters and return format. Every sentence is informative, with no fluff.

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 presence of an output schema (not shown), the description need not detail returns but still gives format. It covers parameters, behavioral nuance (text layer unreliable), and use case context. Complete for a well-defined conversion tool.

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%, but the description explains every parameter: pdf_path (absolute path), batch (prefix for filenames), dpi (rendering resolution, 170 recommended), max_pages (limit, 0=all). This adds essential meaning beyond defaults and types.

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 the tool converts PDF to per-page images and detects text layer, using deterministic pymupdf (not OCR). It is distinguished from sibling convert_doc by specifying it's for multi-modal problem solving (拆题).

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 guidance: for problem solving, use page images directly (text layer unreliable); text layer is only auxiliary for locating problem numbers or pure text questions. It could explicitly mention alternatives like convert_doc, but the context is clear.

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/RuntimeAll/teacher-mcp'

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