Skip to main content
Glama

batch_download_pdfs

"Download open-access PMC PDFs in batch from CSV (PMID+PMCID) or TXT (PMID) files. Skips existing files and retries failures once, then provides a completion report with success and error counts."

Instructions

批量下载 PMC PDF。自动跳过已存在的文件,失败自动重试 1 次。

Args:
    input_file: 输入文件路径。CSV 需含 PMID+PMCID 两列;TXT 每行一个 PMID(会自动查询 PMCID)
    output_dir: PDF 保存目录的绝对路径
    mode: "csv" 或 "txt",默认 "csv"
    num_workers: 并行下载线程数,默认 2
Returns:
    汇总信息字符串,如 "完成: 成功 2400, 失败 36, 报告: <path>"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNocsv
input_fileYes
output_dirYes
num_workersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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?

No annotations are provided, so the description carries the full burden. It discloses key behaviors: automatic skipping of existing files, a single retry on failure, parallel download via num_workers, and the summary return format. This goes well beyond the tool's name and provides useful operational details, though it omits potential rate limits or permission prerequisites.

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 description uses a clear 'Args' list and a 'Returns' line, front-loading the purpose and behavior. It is efficient, with no wasted words, though the return example could be slightly more compact. The structure aids quick parsing.

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 complex batch tool, this is comprehensive: it covers input formats, output directory, mode, concurrency, retry, skip behavior, and the return summary string. The lack of explicit error-handling details is minor, but the description is sufficient for an agent to call the tool correctly.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It explains every parameter: input_file (with format specifics for CSV and TXT), output_dir (absolute path), mode (accepted values and default), and num_workers (thread count and default). This adds significant meaning beyond the schema's bare types and defaults.

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 states a specific verb ('download') with a resource ('PMC PDFs') and clearly identifies a batch operation. It distinguishes itself from siblings like 'download_single_pdf' by the explicit 'batch' scope, so an agent can select it without ambiguity.

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?

The description explains the two input modes ('csv' and 'txt') and the automatic PMCID query for TXT, giving clear context for when this tool is appropriate. However, it does not explicitly compare against alternatives like 'download_single_pdf' or state exclusion conditions, so the routing is implied rather than stated.

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