Skip to main content
Glama

download_single_pdf

Downloads a single open-access PDF from PubMed Central using its PMCID. Saves to your specified directory and skips if the file already exists.

Instructions

下载单个 PMC 文章的 PDF。已存在文件会自动跳过。

Args:
    pmcid: PMCID(如 "PMC7440785")
    output_dir: PDF 保存目录的绝对路径
    pmid: 可选 PMID,用于文件名前缀(默认空)
Returns:
    成功返回 "OK: <bytes> bytes",失败返回 "FAIL: <error>"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pmidNo
pmcidYes
output_dirYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the auto-skip existing files behavior and the return format ('OK: <bytes> bytes' or 'FAIL: <error>'), which is useful. It does not cover potential side effects like directory creation, but for a simple download tool this is adequate.

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 succinct, front-loaded with the core purpose, then structured Args and Returns sections. Every sentence adds value with no fluff or repetition of schema details.

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 3-parameter tool with no complex nesting or enums, the description covers all parameters, the auto-skip behavior, and return values. It lacks explicit mention of whether output_dir is created automatically, a minor gap, but overall complete enough.

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?

The Args section explains every parameter with examples and defaults: pmcid with a concrete example, output_dir as an absolute path, and pmid as optional with default empty. This fully compensates for the 0% schema description coverage.

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 explicitly states the tool downloads a single PMC article PDF, using '单个' (single) to clearly distinguish it from batch_download_pdfs. The verb and resource are specific, and the auto-skip behavior adds further clarity.

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 implies a single-article use case via '单个' and the sibling batch_download_pdfs provides an obvious contrast. However, it does not explicitly state when to choose this over batch or mention any exclusions. The context is clear but not fully explicit.

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