Skip to main content
Glama

PDF 轉圖

pdf_pages

Convert specified PDF pages to JPG or PNG files saved locally, returning each image's path, dimensions, and size for sharing contracts, statements, or catalogs in chat and presentations.

Instructions

把 PDF 指定頁轉成 JPG/PNG 圖檔存在本機(謄本、合約、型錄貼 LINE 或簡報用),回傳每張圖的路徑、尺寸、大小。檔案不會上傳。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pdf_path": "<pdf_path>"
    },
    "name": "pdf_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpiNo解析度,貼 LINE 150、列印 300
pagesNo頁碼範圍,例如 1-3,5,8-;留空=全部(一次最多 200 頁)
formatNo輸出格式jpg
out_dirNo輸出資料夾;留空=PDF 旁邊的「檔名_pages」資料夾。不會覆蓋既有檔案
qualityNoJPG 品質
passwordNoPDF 密碼(有加密才需要)
pdf_pathYes本機 PDF 路徑

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already declare openWorldHint=false and destructiveHint=false, so the description's most valuable addition is the explicit '檔案不會上傳' (files are never uploaded) privacy guarantee, plus the statement that files are written locally. It omits some behavior an agent might want, such as what happens with encrypted PDFs, but the core safety profile is well covered beyond the annotations.

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 definition is a single dense sentence with a useful parenthetical and a return-value clause; the local-only guarantee is front-loaded and nothing is redundant. The nesting of use cases inside the main clause makes it slightly harder to scan than a clean two-sentence split.

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?

For a 7-parameter conversion tool with no output schema, the description covers the operation, the output artifacts, and the local-only privacy guarantee, which is enough to invoke it correctly. Remaining gaps, such as page-limit behavior or overwrite semantics, are already handled by the schema, so the definition is effectively complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including dpi, pages, format, out_dir, quality and password is already documented in the schema. The description adds no parameter-specific detail such as page-range syntax or default folder naming beyond what the schema states, so the baseline of 3 applies.

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 names a specific verb and resource: convert designated PDF pages into JPG/PNG image files saved locally. It also states the output (per-image path, dimensions, size), so an agent can tell instantly what the tool produces. Siblings are unrelated domains, so no disambiguation is required.

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 parenthetical use cases (transcripts, contracts, catalogs for LINE or presentations) give clear context for when to reach for this tool, and the schema note about dpi 150 for LINE vs 300 for print reinforces the intent. It stops short of stating exclusions or naming alternatives, so it does not reach a 5.

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