Skip to main content
Glama
xjtlu-library-mcp

xjtlu-library-mcp

by seally-web

download_pdf

Download a single authorized full-text PDF to the downloads/ folder using a DOI, doi.org link, publisher PDF URL, or article landing page, with an optional filename.

Instructions

下载一篇文献的 PDF 到插件目录 downloads/(仅限你有权访问的内容,单篇按需)。

Args: doi_or_url: DOI、doi.org 链接、出版社 PDF 直链或任何全文落地页 URL 都行。 filename: 可选文件名;留空则用最终 URL 路径的末段。

已经以 .pdf 结尾的直链会原样使用,不会再套出版社模板;空 body 会被判为失败并换下一个候选, 不会留下 0 字节文件。若返回 not_pdf,说明该地址是登录页或 HTML 落地页,先在浏览器确认直链再重试。

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": {
      "doi_or_url": "<doi_or_url>"
    },
    "name": "download_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNo
doi_or_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4.3/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 and does well: it discloses the write destination, that direct .pdf links bypass publisher templates, that empty bodies are treated as failures with fallback to the next candidate (no 0-byte leftovers), and what a not_pdf return means. It omits auth/cookie requirements and whether existing files are overwritten, which matters given login-related siblings.

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?

Purpose and destination are front-loaded, then parameters, then edge-case behavior. The Args block plus short behavioral paragraphs are dense without filler, though the failure-mode sentences could be tightened slightly.

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?

For a two-parameter download tool with no annotations and no output schema, the definition covers inputs, destination, URL normalization, failure detection, and error-signal interpretation. An agent can call it and handle the common failure correctly without further information.

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%, and the description fully compensates: doi_or_url is documented as accepting a bare DOI, a doi.org link, a publisher PDF direct link, or any full-text landing page URL, and filename is documented as optional with a default derived from the final URL path segment.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 ('下载一篇文献的 PDF' – download a paper's PDF) and states the destination directory 'downloads/'. The DOI/URL input scoping makes its role distinct from generic download siblings like browser_download, though no sibling is named explicitly.

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?

It gives clear context: use for a single article on demand and only for content the agent has access rights to, which implicitly excludes bulk or unauthorized scraping. It also explains the not_pdf failure path and instructs verifying the direct link in the browser before retrying. It stops short of naming the close alternatives (open_fulltext, browser_download).

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