Skip to main content
Glama

Get Preprint Full Text

biorxiv_get_fulltext
Read-only

Retrieve a preprint's full text as best-effort Markdown, extracted from its rendered HTML article page. Reads the latest version unless one is requested (the version input, or a vN suffix on the DOI), confirms it via the details API, then fetches and extracts the body — abstract, sections, and references. bioRxiv and medRxiv share the 10.1101/ DOI prefix, so server="both" (the default) resolves the DOI against both in parallel and the response reports which server answered. This is HTML-to-Markdown extraction, not structured JATS: section structure is approximate and not guaranteed. Long articles exceed a single response, so use offset and limit to page through them (the response reports totalChars, remainingChars, and hasMore); paging is cheap because the extracted article is cached per version for an hour after the first read, so only the first chunk pays for a fetch. Not every preprint has an extractable HTML page — some are PDF-only and some origins block programmatic access — in which case a fulltext_unavailable error routes you to biorxiv_get_preprint for the title, abstract, and metadata. For a preprint that has been published in a journal, the journal's version may have richer full text elsewhere.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doiYesPreprint DOI (e.g. 10.1101/2024.05.28.596311 or 10.64898/2026.05.07.723463). A doi.org or biorxiv.org/medrxiv.org article URL, a doi: prefix, or a .full suffix is accepted and stripped; a trailing vN (…596311v2) requests that version. Without one, the latest version is resolved automatically.
limitNoMaximum number of characters to return in this chunk. Default 20,000; increase toward 50,000 for large context windows. Check the length field for the actual count returned.
offsetNoCharacter offset into the full extracted text at which to start reading. 0 returns the beginning. To read the next chunk, use offset = prior_offset + prior_length (the length field from the previous response).
serverNoServer the preprint was posted on. "both" (default) checks bioRxiv and medRxiv in parallel to resolve the DOI — the full-text fetch itself only ever targets whichever server resolved, and the output server field names it.both
versionNoPreprint version to read (1, 2, …) — the revision numbers biorxiv_get_preprint lists. Omit for the latest version. Must match a vN suffix on the DOI when both are given.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe limit (max characters) applied to this chunk.
doiNoThe resolved preprint DOI, in bare form.
errorNoPresent when the call failed. Absent on success.
shownNoCharacters returned in this chunk.
titleNoArticle title detected during extraction. Absent when the page exposed none.
lengthNoNumber of characters returned in this chunk.
noticeNoPaging guidance when the content was truncated — how to fetch the next chunk.
offsetNoCharacter offset into the full extracted text where this chunk begins.
serverNoServer the preprint was resolved on.
contentNoThe requested chunk of full text as best-effort Markdown extracted from the rendered HTML page. Section structure is approximate — this is not JATS.
hasMoreNoTrue when more text follows this chunk. When true, call again with offset = offset + length.
versionNoPreprint version whose full text was retrieved — the requested one, or the latest revision when none was requested. Pass it back as version when paging.
sourceUrlNoThe full-text HTML page the content was extracted from.
truncatedNoTrue when this chunk was capped by limit and more text remains.
wordCountNoApproximate word count of the FULL extracted article, not just the returned chunk — whitespace-delimited tokens of the same Markdown text that totalChars measures, so Markdown markers such as # and - count too.
totalCharsNoTotal characters in the full extracted text. Use with offset and length to page through long articles.
contentFormatNoHow content was produced: Markdown extracted from the rendered HTML article page (constant).
remainingCharsNoCharacters remaining after this chunk (totalChars - offset - length). 0 means this chunk reaches the end.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / doi / description
      Previous value: -"Preprint DOI (e.g. 10.1101/2024.05.28.596311 or 10.64898/2026.05.07.723463). The latest version is resolved automatically."New value: +"Preprint DOI (e.g. 10.1101/2024.05.28.596311 or 10.64898/2026.05.07.723463). A doi.org or biorxiv.org/medrxiv.org article URL, a doi: prefix, or a .full suffix is accepted and stripped; a trailing vN (…596311v2) requests that version. Without one, the latest version is resolved automatically."
    • addedInput schema / properties / version
      Added value: +{
      +  "description": "Preprint version to read (1, 2, …) — the revision numbers biorxiv_get_preprint lists. Omit for the latest version. Must match a vN suffix on the DOI when both are given.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "doi",
      -      "server",
      -      "version",
      -      "content",
      -      "contentFormat",
      -      "sourceUrl",
      -      "offset",
      -      "length",
      -      "totalChars",
      -      "remainingChars",
      -      "hasMore"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "doi",
      +      "server",
      +      "version",
      +      "content",
      +      "contentFormat",
      +      "wordCount",
      +      "sourceUrl",
      +      "offset",
      +      "length",
      +      "totalChars",
      +      "remainingChars",
      +      "hasMore"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / doi / description
      Previous value: -"The resolved preprint DOI."New value: +"The resolved preprint DOI, in bare form."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_doi_format`: The input DOI does not match the 10.NNNN/ pattern. `doi_not_found`: The DOI resolves to an empty collection on every attempted server. `upstream_unavailable`: No attempted server resolved the DOI and at least one lookup failed against api.biorxiv.org. `rate_limited`: Either origin returned HTTP 429 for this host — the article page (www.biorxiv.org / www.medrxiv.org) during the full-text fetch, or api.biorxiv.org during version resolution. `fulltext_unavailable`: The preprint exists but its full-text HTML page is blocked, missing, or yields no extractable text (PDF-only). `offset_out_of_range`: offset is greater than or equal to the total character length of the extracted text. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_doi_format`: The input DOI does not match the 10.NNNN/ pattern, even after URL, doi:, and suffix stripping. `version_conflict`: The DOI carries a vN suffix and the version input names a different version. `version_not_found`: The preprint exists but has no revision with the requested version number. `doi_not_found`: The DOI resolves to an empty collection on every attempted server. `upstream_unavailable`: No attempted server resolved the DOI and at least one lookup failed against api.biorxiv.org. `rate_limited`: Either origin returned HTTP 429 for this host — the article page (www.biorxiv.org / www.medrxiv.org) during the full-text fetch, or api.biorxiv.org during version resolution. `fulltext_unavailable`: The preprint exists but its full-text HTML page is blocked, missing, or yields no extractable text (PDF-only). `offset_out_of_range`: offset is greater than or equal to the total character length of the extracted text. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_doi_format",
      -  "doi_not_found",
      -  "upstream_unavailable",
      -  "rate_limited",
      -  "fulltext_unavailable",
      -  "offset_out_of_range"
      -]New value: +[
      +  "invalid_doi_format",
      +  "version_conflict",
      +  "version_not_found",
      +  "doi_not_found",
      +  "upstream_unavailable",
      +  "rate_limited",
      +  "fulltext_unavailable",
      +  "offset_out_of_range"
      +]
    • changedOutput schema / properties / version / description
      Previous value: -"Preprint version whose full text was retrieved (the latest revision)."New value: +"Preprint version whose full text was retrieved — the requested one, or the latest revision when none was requested. Pass it back as version when paging."
    • changedOutput schema / properties / wordCount / description
      Previous value: -"Approximate word count of the FULL extracted article as reported by the extractor (not just the returned chunk). Absent when the extractor reported none."New value: +"Approximate word count of the FULL extracted article, not just the returned chunk — whitespace-delimited tokens of the same Markdown text that totalChars measures, so Markdown markers such as # and - count too."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true and openWorldHint=true; the description carries the full behavioral burden and does so richly. It discloses that extraction is best-effort HTML-to-Markdown with approximate section structure, explains caching for an hour per version, details paging semantics via totalChars/remainingChars/hasMore, and describes server resolution behavior for 'both'. No contradictions with annotations.

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 long but every sentence earns its place: version resolution, server ambiguity, extraction caveats, paging/caching, failure modes, and alternatives. It is front-loaded with the core purpose and organized logically from retrieval to error handling, making it appropriately sized for a complex tool.

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?

Given the output schema exists and the annotations cover safety, the description completes the picture: it names the response fields used for paging (totalChars, remainingChars, hasMore), explains the error case and its routing, and notes version selection behavior. Nothing needed for correct invocation is missing.

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 baseline is 3. The schema already documents each parameter's purpose, defaults, and constraints (e.g., offset = prior_offset + prior_length, version matching vN suffix). The description reinforces paging/caching behavior but does not add significant meaning beyond the schema details, so it stays at baseline.

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 opens with a specific verb and object: 'Retrieve a preprint's full text as best-effort Markdown, extracted from its rendered HTML article page.' It distinguishes itself from structured JATS and names the fallback sibling biorxiv_get_preprint, so an agent can clearly tell what this tool does and how it differs from related tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool (when full text is needed) and provides a fallback path: 'a fulltext_unavailable error routes you to biorxiv_get_preprint for the title, abstract, and metadata.' It also mentions that PDF-only articles and blocked origins prevent use, and points to journal versions as a potentially richer alternative elsewhere. This gives clear when/when-not routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.