Skip to main content
Glama

Download paper or thesis

article_download

Download a selected article or dissertation by DOI, OpenAlex ID, or Anna's Archive hash, resolving an open PDF or TEI XML and returning the host file path.

Instructions

Get a selected work using exactly one of doi, openalex_id or hash. A DOI or W ID can be downloaded directly without a separate search. A no-DOI dissertation uses its OpenAlex W ID. Auto resolves a hosted or direct open PDF before eligible Anna's Archive DOI fallback; an AA hash selects that exact file. Explicit provider, version or location_id constrains the copy. Hosted content uses OpenAlex allowance. Verified local copies are reused. Returns the absolute path on this MCP server's host, bytes and source; share that path only when the client can access it. A success is required before claiming delivery.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "article_download"
  }
}

Input Schema

NameRequiredDescriptionDefault
doiNoDOI, doi: identifier or https://doi.org/ URL. Supply exactly one of doi, openalex_id or hash
hashNo32-character MD5 hash or Anna's Archive /md5/ page URL. Supply exactly one of doi, openalex_id or hash
titleNoOptional title override for the saved filename
formatNoOptional filename extension such as pdf. Inferred when omitted; does not convert the file
versionNoOptional strict version: published, accepted or submitted. Unknown-version hosted PDFs cannot satisfy an explicit version
artifactNopdf (default) or tei_xml for structured OpenAlex full text. Hosted content requests consume the OpenAlex allowance. File extensions do not convert content
providerNoauto (default), openalex or anna. Auto can use a hosted PDF, open repository or publisher PDF, then Anna's Archive. An explicit provider constrains fallback
location_idNoExact location ID from article_details. Copy it unchanged to request only that copy
openalex_idNoOpenAlex W ID or work URL, including a dissertation without a DOI. Supply exactly one of doi, openalex_id or hash
timeout_secondsNoTotal operation timeout in seconds, including retries. Defaults to 1800; maximum 86400

Output Schema

NameRequiredDescriptionDefault
providerNoProvider that supplied this result
next_argsNoArguments to replay for the next passage
openalex_idNoCanonical OpenAlex W ID, usable by article_download
details_argsNoArguments to article_details
download_argsNoArguments to article_download for this selected work or copy
next_search_argsNoProvider-pinned article_search arguments for the next page

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changedv0.8.0
    • addedInput schema / properties / artifact
      Added value: +{
      +  "description": "pdf (default) or tei_xml for structured OpenAlex full text. Hosted content requests consume the OpenAlex allowance. File extensions do not convert content",
      +  "type": "string"
      +}
    • changedInput schema / properties / doi / description
      Previous value: -"DOI, doi: identifier or https://doi.org/ URL. Supply exactly one of doi or hash"New value: +"DOI, doi: identifier or https://doi.org/ URL. Supply exactly one of doi, openalex_id or hash"
    • changedInput schema / properties / hash / description
      Previous value: -"32-character MD5 hash or Anna's Archive /md5/ page URL. Supply exactly one of doi or hash"New value: +"32-character MD5 hash or Anna's Archive /md5/ page URL. Supply exactly one of doi, openalex_id or hash"
    • addedInput schema / properties / location_id
      Added value: +{
      +  "description": "Exact location ID from article_details. Copy it unchanged to request only that copy",
      +  "type": "string"
      +}
    • addedInput schema / properties / openalex_id
      Added value: +{
      +  "description": "OpenAlex W ID or work URL, including a dissertation without a DOI. Supply exactly one of doi, openalex_id or hash",
      +  "type": "string"
      +}
    • addedInput schema / properties / provider
      Added value: +{
      +  "description": "auto (default), openalex or anna. Auto can use a hosted PDF, open repository or publisher PDF, then Anna's Archive. An explicit provider constrains fallback",
      +  "type": "string"
      +}
    • addedInput schema / properties / version
      Added value: +{
      +  "description": "Optional strict version: published, accepted or submitted. Unknown-version hosted PDFs cannot satisfy an explicit version",
      +  "type": "string"
      +}
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • removedOutput schema / properties / bytes
      Removed value: -{
      -  "type": "integer"
      -}
    • addedOutput schema / properties / details_args
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Arguments to article_details",
      +  "type": "object"
      +}
    • addedOutput schema / properties / download_args
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Arguments to article_download for this selected work or copy",
      +  "type": "object"
      +}
    • removedOutput schema / properties / downloads_left
      Removed value: -{
      -  "type": [
      -    "null",
      -    "integer"
      -  ]
      -}
    • addedOutput schema / properties / next_args
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Arguments to replay for the next passage",
      +  "type": "object"
      +}
    • addedOutput schema / properties / next_search_args
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Provider-pinned article_search arguments for the next page",
      +  "type": "object"
      +}
    • addedOutput schema / properties / openalex_id
      Added value: +{
      +  "description": "Canonical OpenAlex W ID, usable by article_download",
      +  "type": "string"
      +}
    • removedOutput schema / properties / path
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / provider
      Added value: +{
      +  "description": "Provider that supplied this result",
      +  "type": "string"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "path",
      -  "bytes"
      -]
  2. Changed3 schema fields changedv0.7.0
    • changedInput schema / properties / doi / description
      Previous value: -"DOI, doi: identifier, or https://doi.org/ URL. Supply exactly one of doi or hash"New value: +"DOI, doi: identifier or https://doi.org/ URL. Supply exactly one of doi or hash"
    • changedInput schema / properties / hash / description
      Previous value: -"32-character MD5 hash from search. Supply exactly one of doi or hash"New value: +"32-character MD5 hash or Anna's Archive /md5/ page URL. Supply exactly one of doi or hash"
    • addedOutput schema / properties / downloads_left
      Added value: +{
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
  3. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, destructiveHint=false), it discloses the resolution order (hosted/direct open PDF, then eligible Anna's Archive DOI fallback), that hosted content consumes the OpenAlex allowance, that verified local copies are reused, and that an explicit provider/version constrains fallback. It also adds a critical operational caveat: the returned absolute path is on the MCP server's host and should only be shared if the client can reach it, and success is required before claiming delivery.

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 identifier rule is front-loaded and each sentence carries information about resolution order, allowances, or delivery caveats. Some sentences are telegraphic and hard to parse on first read, e.g. 'Auto resolves a hosted or direct open PDF before eligible Anna's Archive DOI fallback'.

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 10-parameter, mode-dependent tool with an output schema, the description covers resolution strategy, allowance consumption, caching, and path-sharing caveats, which is most of what an agent needs. It does not describe failure behavior when no copy is found or when the fallback chain is exhausted.

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 the schema already documents every parameter, making 3 the baseline. The description reinforces the mutual exclusivity of doi/openalex_id/hash and the constraint that an explicit provider or version limits fallback, but most of that nuance is already repeated in the per-parameter descriptions.

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 states a specific action and resource: fetch a work's file via exactly one of doi, openalex_id or hash, with the title concisely framing it as 'Download paper or thesis'. It implicitly separates itself from article_search/article_details by operating on identifiers rather than queries, but it never names a sibling tool, so the distinction from article_read or book_download must be inferred.

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 concrete selection guidance: 'A DOI or W ID can be downloaded directly without a separate search' and 'A no-DOI dissertation uses its OpenAlex W ID', which tells the agent when this tool replaces a lookup step. It stops short of explicit exclusions, e.g. when to prefer article_read for in-place text or book_download for books.

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