@cyanheads/biorxiv-mcp-server 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +10 -7
- package/CLAUDE.md +10 -7
- package/README.md +26 -28
- package/changelog/0.4.x/0.4.1.md +27 -0
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts +6 -4
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js +87 -24
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts +20 -8
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js +129 -48
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts +3 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js +32 -19
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.d.ts +12 -5
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.js +63 -13
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js +34 -20
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts +14 -2
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js +64 -28
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +20 -7
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/services/biorxiv/biorxiv-service.d.ts +26 -16
- package/dist/services/biorxiv/biorxiv-service.d.ts.map +1 -1
- package/dist/services/biorxiv/biorxiv-service.js +50 -43
- package/dist/services/biorxiv/biorxiv-service.js.map +1 -1
- package/dist/services/biorxiv/types.d.ts +4 -3
- package/dist/services/biorxiv/types.d.ts.map +1 -1
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts +5 -3
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts.map +1 -1
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js +13 -10
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js.map +1 -1
- package/dist/services/europe-pmc/europe-pmc-service.d.ts +7 -3
- package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -1
- package/dist/services/europe-pmc/europe-pmc-service.js +17 -11
- package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -1
- package/dist/services/shared.d.ts +76 -2
- package/dist/services/shared.d.ts.map +1 -1
- package/dist/services/shared.js +111 -3
- package/dist/services/shared.js.map +1 -1
- package/package.json +2 -2
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** biorxiv-mcp-server
|
|
4
|
-
**Version:** 0.4.
|
|
4
|
+
**Version:** 0.4.1
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
|
|
8
|
-
**Zod:** ^4.6.
|
|
8
|
+
**Zod:** ^4.6.7
|
|
9
9
|
|
|
10
10
|
> **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
|
|
11
11
|
|
|
@@ -197,7 +197,9 @@ src/
|
|
|
197
197
|
services/
|
|
198
198
|
shared.ts # Shared utilities (detectHtmlError, normalizeDoi, normalizeRorId,
|
|
199
199
|
# normalizeUpstreamText, escapeMarkdown, isValidCalendarDate,
|
|
200
|
-
# parseRetryAfterSeconds, findRateLimit, describeWait,
|
|
200
|
+
# parseRetryAfterSeconds, findRateLimit, describeWait,
|
|
201
|
+
# startCallDeadline, remainingBudgetMs, ladderBudgetMs,
|
|
202
|
+
# retryWithinBudget, firstHit, CALL_BUDGET_MS, SERVER_VERSION)
|
|
201
203
|
upstream-text-tables.ts # Closed tables normalizeUpstreamText reads: Highwire placeholders, section headings
|
|
202
204
|
biorxiv/
|
|
203
205
|
biorxiv-service.ts # BiorxivApiService — details, publications, pubs endpoints
|
|
@@ -236,10 +238,10 @@ src/
|
|
|
236
238
|
- **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN` or `10.64898/…`. Run every DOI input through `normalizeDoi()` (`src/services/shared.ts`), which strips doi.org/article URLs, `doi:`, and `vN`/`.full` suffixes and returns `undefined` for anything still malformed — the bioRxiv API returns empty collections for malformed DOIs without an error code. `/pubs` keyed by preprint DOI never parses a `10.64898/` DOI; see `getPublishedVersionByJournalDoi()`.
|
|
237
239
|
- **Category spelling:** the listing API filters only on lowercase with `/` and `_` read as a space (`hiv aids`), and answers anything else with its unfiltered listing, echoing `messages[0].category: "all"`. `BiorxivApiService` owns the spelling and flags `categoryIgnored`; never present a flagged page as filtered.
|
|
238
240
|
- **Funder data:** upstream funder `name`s and ROR `id`s on records are misattributed — expose only `awards` (verbatim, never split), never a funder name or ID. The listing's `funder` filter takes a bare ROR ID (`normalizeRorId()` strips the URL form and checks the checksum), is bioRxiv-only, and `"funder value not found"` (flagged `funderNotFound`) is an error, never an empty page.
|
|
239
|
-
- **Server parameter:** `"biorxiv" | "medrxiv" | "both"`. Default to `"both"`, including for DOI-resolution tools — both servers issue `10.1101/` DOIs, so the DOI never identifies the server and a single-server default silently misses records held by the other. Fan out via `Promise.allSettled` when `"both"` and name the answering server in the output.
|
|
240
|
-
- **Pagination:** integer `cursor` offset.
|
|
241
|
+
- **Server parameter:** `"biorxiv" | "medrxiv" | "both"`. Default to `"both"`, including for DOI-resolution tools — both servers issue `10.1101/` DOIs, so the DOI never identifies the server and a single-server default silently misses records held by the other. Fan out via `Promise.allSettled` when `"both"` and name the answering server in the output — except a lookup for one DOI that one server's answer settles (each DOI in `biorxiv_get_preprint`, `biorxiv_get_fulltext` resolution, `biorxiv_get_published_version`'s crosswalk and `/details` steps, `biorxiv_search_preprints` enrichment of a DOI with neither preprint prefix): it runs through `firstHit()`, which ends the moment the server holding the DOI answers and aborts the other leg, so a stalled server that does not hold it never spends the call's budget.
|
|
242
|
+
- **Pagination:** integer `cursor` row offset. The API fixes its page (30 rows on `/details` listings, 100 on `/pubs`) and takes no size parameter, so no `limit` is ever sent upstream. `biorxiv_list_published_versions` slices its page locally with `limit` (default 25) and continues at `nextCursor`; `biorxiv_list_recent` takes none.
|
|
241
243
|
- **Two-server pagination:** when `server="both"`, surface per-server state: `{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`. A merged cursor is ambiguous. A server whose cursor overshot is flagged `exhausted`: the posting-date listing reports `total: 0` there, and the publication-date listing reports no total at all, so its exhausted entry carries none.
|
|
242
|
-
- **EuropePMC enrichment:** `biorxiv_search_preprints` uses EuropePMC for relevance then enriches matching DOIs via the details endpoint. Enrichment routes based on `input.server` — when explicit ("biorxiv" or "medrxiv"), always use that server. `10.1101/`
|
|
244
|
+
- **EuropePMC enrichment:** `biorxiv_search_preprints` uses EuropePMC for relevance then enriches matching DOIs via the details endpoint. Enrichment routes based on `input.server` — when explicit ("biorxiv" or "medrxiv"), always use that server. The `10.1101/` and `10.64898/` prefixes are a hint only within `server="both"` to try bioRxiv first, then medRxiv when bioRxiv answers empty, never a reliable discriminator (both servers issue them). The ranked search stays `resulttype=lite`, which never carries an abstract; records that fall back to EuropePMC metadata get theirs from one DOI-keyed `resultType=core` query (`getAbstracts`), made only when abstracts are requested and something fell back. A failed lookup is a notice, never a failed search.
|
|
243
245
|
- **`format()` must be content-complete:** Claude Desktop reads `content[]` from `format()`, not `structuredContent`. Revision list, crosswalk data, pagination state, and every abstract a record carries must all appear in the rendered markdown, not just counts. `include_abstract` (default `false` on `biorxiv_list_recent` and `biorxiv_list_published_versions`, `true` on `biorxiv_search_preprints`) removes the abstract from both surfaces together and no other field.
|
|
244
246
|
- **Upstream text in `format()`:** run titles and abstracts through `normalizeUpstreamText()` in the service (never in `format()`), and pass every upstream free-text field through `escapeMarkdown()` where `format()` interpolates it. It escapes only characters that would change rendering (`A\*T`, `\<COMP id>`; `p<0.05` and `cc_by` stay raw), because agents copy spans out of `content[]` — keep it that narrow. Never escape DOIs, URLs, `structuredContent`, or `biorxiv_get_fulltext`'s extracted `content`.
|
|
245
247
|
- **Polite access:** include `BIORXIV_MAILTO` in the `User-Agent` header when set: `biorxiv-mcp-server/${SERVER_VERSION} (mailto:${config.mailto})`. The env var is optional — omit the mailto segment when not configured.
|
|
@@ -396,7 +398,8 @@ import { getEuropePmcService } from '@/services/europe-pmc/europe-pmc-service.js
|
|
|
396
398
|
- [ ] bioRxiv API wrapping: tests include at least one sparse payload case with omitted upstream fields
|
|
397
399
|
- [ ] `BIORXIV_MAILTO` included in outbound User-Agent header when set (optional env var)
|
|
398
400
|
- [ ] DOI input normalized and validated with `normalizeDoi()` before calling API
|
|
399
|
-
- [ ] Two-server fan-out uses `Promise.allSettled
|
|
401
|
+
- [ ] Two-server fan-out uses `Promise.allSettled`, or `firstHit()` for a single-DOI lookup one server's answer settles; partial failures reported per-DOI in `failed[]`. A caller cancellation is rethrown, never reported as a failed leg: `ctx.signal.throwIfAborted()` after every fan-out, and before a degraded or cached result is returned
|
|
402
|
+
- [ ] Every upstream ladder takes the call's remaining deadline: the handler calls `startCallDeadline()` once and passes it to every service call; the service runs each ladder through `retryWithinBudget(attempt, { deadline, operation, … })` — `withRetry` on what is left of the budget, keeping an origin's last 429 as the ladder's answer when the budget runs out — and passes the attempt `signal` to `fetchWithTimeout` and `Math.min(perAttemptMs, remainingMs)` as its timeout. A required step's expiry fails with the tool's declared retryable reason, never a bare `Timeout`
|
|
400
403
|
- [ ] `biorxiv_list_recent` and `biorxiv_list_published_versions` with `server="both"` surface per-server pagination state, not a merged cursor
|
|
401
404
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
402
405
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
package/CLAUDE.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** biorxiv-mcp-server
|
|
4
|
-
**Version:** 0.4.
|
|
4
|
+
**Version:** 0.4.1
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
|
|
8
|
-
**Zod:** ^4.6.
|
|
8
|
+
**Zod:** ^4.6.7
|
|
9
9
|
|
|
10
10
|
> **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
|
|
11
11
|
|
|
@@ -197,7 +197,9 @@ src/
|
|
|
197
197
|
services/
|
|
198
198
|
shared.ts # Shared utilities (detectHtmlError, normalizeDoi, normalizeRorId,
|
|
199
199
|
# normalizeUpstreamText, escapeMarkdown, isValidCalendarDate,
|
|
200
|
-
# parseRetryAfterSeconds, findRateLimit, describeWait,
|
|
200
|
+
# parseRetryAfterSeconds, findRateLimit, describeWait,
|
|
201
|
+
# startCallDeadline, remainingBudgetMs, ladderBudgetMs,
|
|
202
|
+
# retryWithinBudget, firstHit, CALL_BUDGET_MS, SERVER_VERSION)
|
|
201
203
|
upstream-text-tables.ts # Closed tables normalizeUpstreamText reads: Highwire placeholders, section headings
|
|
202
204
|
biorxiv/
|
|
203
205
|
biorxiv-service.ts # BiorxivApiService — details, publications, pubs endpoints
|
|
@@ -236,10 +238,10 @@ src/
|
|
|
236
238
|
- **DOI format:** `10.1101/YYYY.MM.DD.NNNNNN` or `10.64898/…`. Run every DOI input through `normalizeDoi()` (`src/services/shared.ts`), which strips doi.org/article URLs, `doi:`, and `vN`/`.full` suffixes and returns `undefined` for anything still malformed — the bioRxiv API returns empty collections for malformed DOIs without an error code. `/pubs` keyed by preprint DOI never parses a `10.64898/` DOI; see `getPublishedVersionByJournalDoi()`.
|
|
237
239
|
- **Category spelling:** the listing API filters only on lowercase with `/` and `_` read as a space (`hiv aids`), and answers anything else with its unfiltered listing, echoing `messages[0].category: "all"`. `BiorxivApiService` owns the spelling and flags `categoryIgnored`; never present a flagged page as filtered.
|
|
238
240
|
- **Funder data:** upstream funder `name`s and ROR `id`s on records are misattributed — expose only `awards` (verbatim, never split), never a funder name or ID. The listing's `funder` filter takes a bare ROR ID (`normalizeRorId()` strips the URL form and checks the checksum), is bioRxiv-only, and `"funder value not found"` (flagged `funderNotFound`) is an error, never an empty page.
|
|
239
|
-
- **Server parameter:** `"biorxiv" | "medrxiv" | "both"`. Default to `"both"`, including for DOI-resolution tools — both servers issue `10.1101/` DOIs, so the DOI never identifies the server and a single-server default silently misses records held by the other. Fan out via `Promise.allSettled` when `"both"` and name the answering server in the output.
|
|
240
|
-
- **Pagination:** integer `cursor` offset.
|
|
241
|
+
- **Server parameter:** `"biorxiv" | "medrxiv" | "both"`. Default to `"both"`, including for DOI-resolution tools — both servers issue `10.1101/` DOIs, so the DOI never identifies the server and a single-server default silently misses records held by the other. Fan out via `Promise.allSettled` when `"both"` and name the answering server in the output — except a lookup for one DOI that one server's answer settles (each DOI in `biorxiv_get_preprint`, `biorxiv_get_fulltext` resolution, `biorxiv_get_published_version`'s crosswalk and `/details` steps, `biorxiv_search_preprints` enrichment of a DOI with neither preprint prefix): it runs through `firstHit()`, which ends the moment the server holding the DOI answers and aborts the other leg, so a stalled server that does not hold it never spends the call's budget.
|
|
242
|
+
- **Pagination:** integer `cursor` row offset. The API fixes its page (30 rows on `/details` listings, 100 on `/pubs`) and takes no size parameter, so no `limit` is ever sent upstream. `biorxiv_list_published_versions` slices its page locally with `limit` (default 25) and continues at `nextCursor`; `biorxiv_list_recent` takes none.
|
|
241
243
|
- **Two-server pagination:** when `server="both"`, surface per-server state: `{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`. A merged cursor is ambiguous. A server whose cursor overshot is flagged `exhausted`: the posting-date listing reports `total: 0` there, and the publication-date listing reports no total at all, so its exhausted entry carries none.
|
|
242
|
-
- **EuropePMC enrichment:** `biorxiv_search_preprints` uses EuropePMC for relevance then enriches matching DOIs via the details endpoint. Enrichment routes based on `input.server` — when explicit ("biorxiv" or "medrxiv"), always use that server. `10.1101/`
|
|
244
|
+
- **EuropePMC enrichment:** `biorxiv_search_preprints` uses EuropePMC for relevance then enriches matching DOIs via the details endpoint. Enrichment routes based on `input.server` — when explicit ("biorxiv" or "medrxiv"), always use that server. The `10.1101/` and `10.64898/` prefixes are a hint only within `server="both"` to try bioRxiv first, then medRxiv when bioRxiv answers empty, never a reliable discriminator (both servers issue them). The ranked search stays `resulttype=lite`, which never carries an abstract; records that fall back to EuropePMC metadata get theirs from one DOI-keyed `resultType=core` query (`getAbstracts`), made only when abstracts are requested and something fell back. A failed lookup is a notice, never a failed search.
|
|
243
245
|
- **`format()` must be content-complete:** Claude Desktop reads `content[]` from `format()`, not `structuredContent`. Revision list, crosswalk data, pagination state, and every abstract a record carries must all appear in the rendered markdown, not just counts. `include_abstract` (default `false` on `biorxiv_list_recent` and `biorxiv_list_published_versions`, `true` on `biorxiv_search_preprints`) removes the abstract from both surfaces together and no other field.
|
|
244
246
|
- **Upstream text in `format()`:** run titles and abstracts through `normalizeUpstreamText()` in the service (never in `format()`), and pass every upstream free-text field through `escapeMarkdown()` where `format()` interpolates it. It escapes only characters that would change rendering (`A\*T`, `\<COMP id>`; `p<0.05` and `cc_by` stay raw), because agents copy spans out of `content[]` — keep it that narrow. Never escape DOIs, URLs, `structuredContent`, or `biorxiv_get_fulltext`'s extracted `content`.
|
|
245
247
|
- **Polite access:** include `BIORXIV_MAILTO` in the `User-Agent` header when set: `biorxiv-mcp-server/${SERVER_VERSION} (mailto:${config.mailto})`. The env var is optional — omit the mailto segment when not configured.
|
|
@@ -396,7 +398,8 @@ import { getEuropePmcService } from '@/services/europe-pmc/europe-pmc-service.js
|
|
|
396
398
|
- [ ] bioRxiv API wrapping: tests include at least one sparse payload case with omitted upstream fields
|
|
397
399
|
- [ ] `BIORXIV_MAILTO` included in outbound User-Agent header when set (optional env var)
|
|
398
400
|
- [ ] DOI input normalized and validated with `normalizeDoi()` before calling API
|
|
399
|
-
- [ ] Two-server fan-out uses `Promise.allSettled
|
|
401
|
+
- [ ] Two-server fan-out uses `Promise.allSettled`, or `firstHit()` for a single-DOI lookup one server's answer settles; partial failures reported per-DOI in `failed[]`. A caller cancellation is rethrown, never reported as a failed leg: `ctx.signal.throwIfAborted()` after every fan-out, and before a degraded or cached result is returned
|
|
402
|
+
- [ ] Every upstream ladder takes the call's remaining deadline: the handler calls `startCallDeadline()` once and passes it to every service call; the service runs each ladder through `retryWithinBudget(attempt, { deadline, operation, … })` — `withRetry` on what is left of the budget, keeping an origin's last 429 as the ladder's answer when the budget runs out — and passes the attempt `signal` to `fetchWithTimeout` and `Math.min(perAttemptMs, remainingMs)` as its timeout. A required step's expiry fails with the tool's declared retryable reason, never a bare `Timeout`
|
|
400
403
|
- [ ] `biorxiv_list_recent` and `biorxiv_list_published_versions` with `server="both"` surface per-server pagination state, not a merged cursor
|
|
401
404
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
402
405
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/biorxiv-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/biorxiv-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
## Overview
|
|
31
31
|
|
|
32
|
-
bioRxiv and medRxiv
|
|
32
|
+
bioRxiv and medRxiv preprints, metadata and full text. Search by keyword and author, browse a date interval (optionally by subject), fetch any preprint by DOI, and see which preprints went on to journal publication.
|
|
33
33
|
|
|
34
34
|
### Tools
|
|
35
35
|
|
|
@@ -47,23 +47,24 @@ bioRxiv and medRxiv preprint metadata and full text, searchable via EuropePMC. F
|
|
|
47
47
|
|
|
48
48
|
### `biorxiv_get_preprint` <sub>tool</sub>
|
|
49
49
|
|
|
50
|
-
- Takes
|
|
51
|
-
-
|
|
50
|
+
- Takes DOIs bare or pasted (`https://doi.org/…`, `doi:…`, a `biorxiv.org`/`medrxiv.org` article URL, a `vN` or `.full` suffix), scoped to `biorxiv`, `medrxiv`, or `both` (default `both`)
|
|
51
|
+
- Accepts up to 200 entries and looks up the first 10 distinct DOIs; the rest come back in `unprocessed[]` to pass in another call. A repeated DOI is looked up once, and every list keeps input order
|
|
52
|
+
- Each preprint returns its full revision history in `revisions[]` — title, authors, abstract, category, license, `awards`, `jatsxmlUrl`, and `publishedJournalDoi` once accepted. Funder names are omitted because the upstream API misattributes them
|
|
52
53
|
- A DOI that fails lands in `failed[]` with a `reason` (`not_found`, `invalid_doi_format`, `upstream_unavailable`, `rate_limited`) and a `retryable` flag; `not_found` only when every attempted server answered
|
|
53
54
|
|
|
54
55
|
---
|
|
55
56
|
|
|
56
57
|
### `biorxiv_list_recent` <sub>tool</sub>
|
|
57
58
|
|
|
58
|
-
- Takes a `start_date`/`end_date` interval, `server` (default `both`), and optional `category` (a value from `biorxiv_list_categories`) and bioRxiv-only `funder` (a ROR ID) filters; a filter
|
|
59
|
-
- Pages of 30 advance with an integer `cursor
|
|
60
|
-
- Abstracts are omitted by default
|
|
59
|
+
- Takes a `start_date`/`end_date` interval, `server` (default `both`), and optional `category` (a value from `biorxiv_list_categories`) and bioRxiv-only `funder` (a ROR ID) filters; a filter that cannot be applied raises `invalid_category` or `invalid_funder`
|
|
60
|
+
- Pages of 30 advance with an integer `cursor`, tracked per server (`{ biorxiv: { cursor, total }, medrxiv: { cursor, total } }`); a cursor past the last page is marked `exhausted: true`, and a server that did not answer is named in `failed[]`
|
|
61
|
+
- Abstracts are omitted by default; `include_abstract: true` adds them
|
|
61
62
|
|
|
62
63
|
---
|
|
63
64
|
|
|
64
65
|
### `biorxiv_search_preprints` <sub>tool</sub>
|
|
65
66
|
|
|
66
|
-
- Takes `query` and/or `author`, optional `date_from`/`date_to` and `server` (default `both`); up to 100 results per page (default 25), paged with `cursor_mark`
|
|
67
|
+
- Takes `query` and/or `author`, optional `date_from`/`date_to` and `server` (default `both`); up to 100 results per page (default 25; a larger `limit` returns 100 with a notice), paged with `cursor_mark`
|
|
67
68
|
- EuropePMC ranks the matches (it indexes new preprints within 1–2 days of posting) and the bioRxiv/medRxiv API enriches them with the same fields as `biorxiv_get_preprint`; a record left with EuropePMC metadata only carries `enriched: false` and an `enrichment_error` (`service_error`, `rate_limited`, `not_found`), with `partial_results` set
|
|
68
69
|
- Abstracts are included by default; `include_abstract: false` drops them for a response about a third the size
|
|
69
70
|
|
|
@@ -71,26 +72,24 @@ bioRxiv and medRxiv preprint metadata and full text, searchable via EuropePMC. F
|
|
|
71
72
|
|
|
72
73
|
### `biorxiv_get_published_version` <sub>tool</sub>
|
|
73
74
|
|
|
74
|
-
- Takes one preprint DOI and `server` (default `both`
|
|
75
|
-
- Returns journal DOI, journal name, published date, corresponding-author institution, and the `server` that answered; no server
|
|
75
|
+
- Takes one preprint DOI and `server` (default `both`); `10.64898/` DOIs resolve through the preprint's own journal DOI
|
|
76
|
+
- Returns journal DOI, journal name, published date, corresponding-author institution, and the `server` that answered; if no server answers it raises a retryable `upstream_unavailable` or `rate_limited`, never `doi_not_found`
|
|
76
77
|
|
|
77
78
|
---
|
|
78
79
|
|
|
79
80
|
### `biorxiv_list_published_versions` <sub>tool</sub>
|
|
80
81
|
|
|
81
|
-
- Takes a `start_date`/`end_date` interval of journal publication dates and `server` (default `both`); each row
|
|
82
|
-
-
|
|
83
|
-
- Abstracts are omitted by default
|
|
82
|
+
- Takes a `start_date`/`end_date` interval of journal publication dates and `server` (default `both`); each row matches the record `biorxiv_get_published_version` returns, and may be a preprint posted years earlier
|
|
83
|
+
- Returns `limit` rows per server (default 25, up to the API's 100-row page) from an integer `cursor`, continued at each server's `nextCursor`; a cursor past the last row is marked `exhausted: true`, and a server that did not answer is named in `failed[]`
|
|
84
|
+
- Abstracts are omitted by default; `include_abstract: true` adds them
|
|
84
85
|
|
|
85
86
|
---
|
|
86
87
|
|
|
87
88
|
### `biorxiv_get_fulltext` <sub>tool</sub>
|
|
88
89
|
|
|
89
|
-
- Takes a DOI, `server` (default `both`), and an optional `version` (or a `vN` suffix
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
- Pages via `offset`/`limit` characters (default 20,000; a `limit` past the remaining text returns the rest), reporting `totalChars`, `remainingChars`, `hasMore`, and `wordCount`; the extracted article is cached per version, so paging costs one origin fetch
|
|
93
|
-
- PDF-only preprints and blocked pages raise `fulltext_unavailable`, routing to `biorxiv_get_preprint`
|
|
90
|
+
- Takes a DOI, `server` (default `both`), and an optional `version` (or a `vN` suffix; the two must agree, and a version the preprint lacks raises `version_not_found`); returns Markdown extracted from the rendered HTML article page, naming the answering `server`
|
|
91
|
+
- Table cells are not on the page: each table keeps its caption, and `omittedTables` names it with the URL that serves its cells
|
|
92
|
+
- Pages via `offset`/`limit` characters (default 20,000), reporting `totalChars`, `remainingChars`, `hasMore`, and `wordCount`; PDF-only preprints and blocked pages raise `fulltext_unavailable`, routing to `biorxiv_get_preprint`
|
|
94
93
|
|
|
95
94
|
---
|
|
96
95
|
|
|
@@ -105,20 +104,19 @@ Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): s
|
|
|
105
104
|
|
|
106
105
|
bioRxiv-specific:
|
|
107
106
|
|
|
108
|
-
- `BiorxivApiService` wraps `api.biorxiv.org`
|
|
109
|
-
- `
|
|
110
|
-
-
|
|
111
|
-
-
|
|
107
|
+
- `BiorxivApiService` wraps `api.biorxiv.org` (details, publications, and crosswalk endpoints) and `EuropePmcService` wraps EuropePMC search, both with retry and exponential backoff
|
|
108
|
+
- `BiorxivFullTextService` extracts Markdown from the article pages on `www.biorxiv.org` / `www.medrxiv.org`
|
|
109
|
+
- Every upstream retry ladder runs on what is left of the tool call's one 50 s budget, so a hung origin ends before a client's 60 s request timeout — in a classified, retryable error, or, when the step that hung is optional, in a result that says what is missing
|
|
110
|
+
- Queries `biorxiv` and `medrxiv` in parallel when `server="both"`, each result naming the server that answered; a lookup by DOI stops waiting once the server holding that DOI answers
|
|
112
111
|
- Polite `User-Agent` header including a mailto address (`BIORXIV_MAILTO` env var) per Cold Spring Harbor Lab API guidelines
|
|
113
112
|
- Pairs with **pubmed-mcp-server** (post-publication), **openalex-mcp-server** (citation analytics), and **crossref-mcp-server** (DOI metadata)
|
|
114
113
|
|
|
115
114
|
Agent-friendly output:
|
|
116
115
|
|
|
117
|
-
- Graceful partial failure — per-DOI and per-server failures land in `failed[]` with a typed `reason` and `retryable` flag instead of aborting the
|
|
118
|
-
- Rate-limit transparency — a 429
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
- Clean titles and abstracts — Highwire export markup is resolved to plain text on both surfaces: symbol placeholders (`{beta}`, `{+/-}`, `[≥]`) become their characters, structured-abstract headings read `Results: …`, list items read `• …`, and figure and table blocks are dropped. The Markdown in `content[]` escapes upstream text so it renders as written
|
|
116
|
+
- Graceful partial failure — per-DOI and per-server failures land in `failed[]` with a typed `reason` and `retryable` flag instead of aborting the call
|
|
117
|
+
- Rate-limit transparency — a 429 surfaces as `reason: "rate_limited"` with the parsed `retryAfter` wait, distinct from `upstream_unavailable`
|
|
118
|
+
- Typed enrichment status — `biorxiv_search_preprints` results carry `enriched` plus a typed `enrichment_error` (`service_error` / `rate_limited` / `not_found`)
|
|
119
|
+
- Clean titles and abstracts — export markup and symbol placeholders (`{beta}`, `[≥]`) are resolved to plain text
|
|
122
120
|
|
|
123
121
|
## Getting started
|
|
124
122
|
|
|
@@ -235,7 +233,7 @@ All configuration is validated at startup via Zod schemas in `src/config/server-
|
|
|
235
233
|
|
|
236
234
|
| Variable | Description | Default |
|
|
237
235
|
|:---|:---|:---|
|
|
238
|
-
| `BIORXIV_MAILTO` | Email address
|
|
236
|
+
| `BIORXIV_MAILTO` | Email address for the `User-Agent` header; optional but recommended. | — |
|
|
239
237
|
| `BIORXIV_API_BASE_URL` | Override the bioRxiv API base URL. | `https://api.biorxiv.org` |
|
|
240
238
|
| `EUROPEPMC_API_BASE_URL` | Override the EuropePMC base URL. | `https://www.ebi.ac.uk/europepmc/webservices/rest` |
|
|
241
239
|
| `BIORXIV_WEB_BASE_URL` | Override the bioRxiv website base URL (full-text HTML source for `biorxiv_get_fulltext`). | `https://www.biorxiv.org` |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Every tool call runs its upstream requests on one 50 s budget, so a hung origin ends in a classified error before a client's 60 s timeout. biorxiv_get_preprint and biorxiv_search_preprints serve their per-call cap instead of rejecting an oversized request, and biorxiv_list_published_versions takes a limit (default 25)."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.4.1 — 2026-10-17
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **Call budget** — every upstream retry ladder in `biorxiv_get_preprint`, `biorxiv_get_published_version`, `biorxiv_get_fulltext`, `biorxiv_search_preprints`, `biorxiv_list_recent`, and `biorxiv_list_published_versions` draws on one 50 s budget per tool call, chained requests included. A step that runs out of it fails with the tool's retryable upstream reason, or degrades where the tool already degrades; the budget never aborts the caller's signal (#64).
|
|
12
|
+
- **`biorxiv_get_fulltext` article page** — a page that times out, keeps failing with a 5xx or network error, or runs out the budget raises `upstream_unavailable` instead of a bare timeout (-32004) or an undeclared 5xx; when the version lookup used most of the budget, the error says so (#64).
|
|
13
|
+
- **`biorxiv_list_recent` with one server queried** — a failed listing raises the declared `upstream_unavailable` or `rate_limited`, as a two-server call does, instead of the service's own error, which left a timeout or 5xx with no declared reason (#64).
|
|
14
|
+
- **DOI lookups** — with `server: "both"`, a lookup for one DOI ends when the server holding it answers and cuts the other lookup short, so a stalled server that lacks the DOI no longer spends the call's budget (#64).
|
|
15
|
+
- **`biorxiv_get_preprint` `dois`** — accepts up to 200 entries. The first 10 distinct DOIs are looked up and the rest return in the new `unprocessed` array, with a notice and the truncation fields. An unparseable entry goes to `failed[]` wherever it sits, a repeated DOI is looked up once, and all lists keep input order; batch-level errors raise only when nothing resolved and `unprocessed` is empty (#63).
|
|
16
|
+
- **`biorxiv_search_preprints` `limit`** — a value above 100 returns the first 100 results with a notice, and the truncation fields when the page holds all 100; `nextCursorMark` continues the list. The schema ceiling is 1000 (#69).
|
|
17
|
+
- **`biorxiv_list_published_versions` `limit`** — new input (default 25, up to 1000) sets the rows returned per server, sliced from the start of the upstream page. `nextCursor` advances by the rows served, and the truncation fields are set while a server has rows left; `limit: 100` returns the previous full page, and a larger value returns 100 with a notice. The default page is now 25 rows per server (#68).
|
|
18
|
+
- **Minor:** the `preprintDate` descriptions on `biorxiv_get_published_version` and on `biorxiv_list_published_versions` rows note that medRxiv lists some `10.64898/` preprints twice with different posting dates.
|
|
19
|
+
|
|
20
|
+
## Fixed
|
|
21
|
+
|
|
22
|
+
- **Cancellation** — `biorxiv_get_preprint`, `biorxiv_list_recent`, `biorxiv_get_published_version`, `biorxiv_search_preprints`, and `biorxiv_get_fulltext` rethrow a caller cancellation (-32011) instead of recording the aborted leg as a failed lookup or returning a partial result (#65).
|
|
23
|
+
- **Service test assertions** — the three HTML-error tests in `BiorxivApiService` and the full-text 5xx test assert the classified error, so removing their guards fails them (#66).
|
|
24
|
+
|
|
25
|
+
## Dependencies
|
|
26
|
+
|
|
27
|
+
- `zod` ^4.6.6 → ^4.6.7
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* and run through the framework extractor. bioRxiv and medRxiv share the
|
|
9
9
|
* 10.1101/ DOI prefix, so the default server="both" resolves the DOI against both
|
|
10
10
|
* in parallel; the fan-out is narrower than biorxiv_get_published_version's — only
|
|
11
|
-
* the resolution step fans out,
|
|
12
|
-
*
|
|
11
|
+
* the resolution step fans out, it ends the moment the server holding the DOI
|
|
12
|
+
* answers (the other lookup is cut short, so a stalled server never spends the
|
|
13
|
+
* article page's budget), and the full-text fetch targets that one server. Long
|
|
14
|
+
* articles are paged with offset/limit character chunking;
|
|
13
15
|
* the tables the page carries no cells for (`omittedTables`) ride on every chunk.
|
|
14
16
|
* Full text is best-effort HTML→Markdown, not structured JATS; preprints that are
|
|
15
17
|
* PDF-only or whose page is blocked return a typed `fulltext_unavailable` error
|
|
@@ -85,8 +87,8 @@ export declare const biorxivGetFulltextTool: import("@cyanheads/mcp-ts-core").To
|
|
|
85
87
|
readonly reason: "upstream_unavailable";
|
|
86
88
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
87
89
|
readonly retryable: true;
|
|
88
|
-
readonly when: "No attempted server resolved the DOI and at least one lookup failed against api.biorxiv.org.";
|
|
89
|
-
readonly recovery: "Retry the request after a short delay — the preprint may well exist; api.biorxiv.org did not answer.";
|
|
90
|
+
readonly when: "No attempted server resolved the DOI and at least one lookup failed against api.biorxiv.org; the version lookup used most of the call's time budget, so the article page was never requested or had not answered when the budget ran out; or the article page (www.biorxiv.org / www.medrxiv.org) did not answer within the call.";
|
|
91
|
+
readonly recovery: "Retry the request after a short delay — the preprint may well exist; api.biorxiv.org did not answer the version lookup.";
|
|
90
92
|
}, {
|
|
91
93
|
readonly reason: "rate_limited";
|
|
92
94
|
readonly code: JsonRpcErrorCode.RateLimited;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biorxiv-get-fulltext.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"biorxiv-get-fulltext.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAyC3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiejC,CAAC"}
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* and run through the framework extractor. bioRxiv and medRxiv share the
|
|
9
9
|
* 10.1101/ DOI prefix, so the default server="both" resolves the DOI against both
|
|
10
10
|
* in parallel; the fan-out is narrower than biorxiv_get_published_version's — only
|
|
11
|
-
* the resolution step fans out,
|
|
12
|
-
*
|
|
11
|
+
* the resolution step fans out, it ends the moment the server holding the DOI
|
|
12
|
+
* answers (the other lookup is cut short, so a stalled server never spends the
|
|
13
|
+
* article page's budget), and the full-text fetch targets that one server. Long
|
|
14
|
+
* articles are paged with offset/limit character chunking;
|
|
13
15
|
* the tables the page carries no cells for (`omittedTables`) ride on every chunk.
|
|
14
16
|
* Full text is best-effort HTML→Markdown, not structured JATS; preprints that are
|
|
15
17
|
* PDF-only or whose page is blocked return a typed `fulltext_unavailable` error
|
|
@@ -29,10 +31,34 @@
|
|
|
29
31
|
* @module mcp-server/tools/definitions/biorxiv-get-fulltext.tool
|
|
30
32
|
*/
|
|
31
33
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
32
|
-
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
34
|
+
import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
35
|
+
import { defaultIsTransient } from '@cyanheads/mcp-ts-core/utils';
|
|
33
36
|
import { getBiorxivApiService } from '../../../services/biorxiv/biorxiv-service.js';
|
|
34
37
|
import { getBiorxivFullTextService } from '../../../services/biorxiv-fulltext/biorxiv-fulltext-service.js';
|
|
35
|
-
import { describeWait, escapeMarkdown, findRateLimit, normalizeDoi } from '../../../services/shared.js';
|
|
38
|
+
import { CALL_BUDGET_MS, describeWait, escapeMarkdown, findRateLimit, firstHit, normalizeDoi, remainingBudgetMs, startCallDeadline, } from '../../../services/shared.js';
|
|
39
|
+
/**
|
|
40
|
+
* Whether the article-page fetch ended on the call's budget running out before
|
|
41
|
+
* the page had failed at all: it was never requested, or its one request was
|
|
42
|
+
* still waiting when the budget cut it off. A page that timed out, answered an
|
|
43
|
+
* error, or dropped the connection on its own failed, whatever was left.
|
|
44
|
+
*/
|
|
45
|
+
function endedOnCallBudget(err) {
|
|
46
|
+
const data = err.data;
|
|
47
|
+
if (data?.reason !== 'retry_deadline_exceeded')
|
|
48
|
+
return false;
|
|
49
|
+
if (data.retryAttempts === 0)
|
|
50
|
+
return true;
|
|
51
|
+
// The budget's abort reaches a request in flight, headers or body, as
|
|
52
|
+
// `fetchWithTimeout`'s FetchSignalTimeout.
|
|
53
|
+
const { cause } = err;
|
|
54
|
+
return (data.retryAttempts === 1 &&
|
|
55
|
+
cause instanceof McpError &&
|
|
56
|
+
cause.data?.errorSource === 'FetchSignalTimeout');
|
|
57
|
+
}
|
|
58
|
+
/** A share of the call's budget as an error message states it: `500 ms`, `49.5 s`. */
|
|
59
|
+
function describeDuration(ms) {
|
|
60
|
+
return ms < 1_000 ? `${ms} ms` : `${(ms / 1_000).toFixed(1)} s`;
|
|
61
|
+
}
|
|
36
62
|
export const biorxivGetFulltextTool = tool('biorxiv_get_fulltext', {
|
|
37
63
|
title: 'Get Preprint Full Text',
|
|
38
64
|
description: '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, inline citation labels, and the reference list. Table cells are not on the article page: each table appears as its caption, and omittedTables names it with the URL that serves its cells. 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.',
|
|
@@ -154,8 +180,8 @@ export const biorxivGetFulltextTool = tool('biorxiv_get_fulltext', {
|
|
|
154
180
|
reason: 'upstream_unavailable',
|
|
155
181
|
code: JsonRpcErrorCode.ServiceUnavailable,
|
|
156
182
|
retryable: true,
|
|
157
|
-
when:
|
|
158
|
-
recovery: 'Retry the request after a short delay — the preprint may well exist; api.biorxiv.org did not answer.',
|
|
183
|
+
when: "No attempted server resolved the DOI and at least one lookup failed against api.biorxiv.org; the version lookup used most of the call's time budget, so the article page was never requested or had not answered when the budget ran out; or the article page (www.biorxiv.org / www.medrxiv.org) did not answer within the call.",
|
|
184
|
+
recovery: 'Retry the request after a short delay — the preprint may well exist; api.biorxiv.org did not answer the version lookup.',
|
|
159
185
|
},
|
|
160
186
|
{
|
|
161
187
|
reason: 'rate_limited',
|
|
@@ -205,25 +231,21 @@ export const biorxivGetFulltextTool = tool('biorxiv_get_fulltext', {
|
|
|
205
231
|
const requestedVersion = inputVersion ?? parsed.version;
|
|
206
232
|
// Resolve the preprint and its versions via the JSON details API — this
|
|
207
233
|
// confirms the requested version exists (or supplies the latest), and gives
|
|
208
|
-
// clean not-found handling. Only this step fans out
|
|
209
|
-
//
|
|
234
|
+
// clean not-found handling. Only this step fans out, and it ends the moment
|
|
235
|
+
// the server holding the DOI answers; the full-text fetch targets that server.
|
|
210
236
|
const service = getBiorxivApiService();
|
|
237
|
+
// One budget for resolution and the article page, which run one after another.
|
|
238
|
+
const deadline = startCallDeadline();
|
|
211
239
|
const servers = input.server === 'both' ? ['biorxiv', 'medrxiv'] : [input.server];
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
};
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
if (!resolved) {
|
|
240
|
+
const { hit, outcomes } = await firstHit(servers.map((server) => (signal) => service.getDetails(doi, server, deadline, ctx, signal)), (revisions) => revisions.length > 0, ctx.signal);
|
|
241
|
+
// A cancelled call is not resolved from the leg that finished first, nor
|
|
242
|
+
// reported as a failed lookup.
|
|
243
|
+
ctx.signal.throwIfAborted();
|
|
244
|
+
// Only the lookups that had answered when resolution ended.
|
|
245
|
+
const rejections = outcomes.flatMap((r, i) => r?.status === 'rejected' ? [{ server: servers[i], error: r.reason }] : []);
|
|
246
|
+
if (!hit) {
|
|
224
247
|
// "Not found" is a claim about what the servers reported, so a server that
|
|
225
248
|
// never answered leaves absence unestablished — and retryable.
|
|
226
|
-
const rejections = settled.flatMap((r, i) => r.status === 'rejected' ? [{ server: servers[i], error: r.reason }] : []);
|
|
227
249
|
if (rejections.length > 0) {
|
|
228
250
|
const detail = rejections
|
|
229
251
|
.map((f) => `${f.server}: ${f.error instanceof Error ? f.error.message : String(f.error)}`)
|
|
@@ -253,7 +275,8 @@ export const biorxivGetFulltextTool = tool('biorxiv_get_fulltext', {
|
|
|
253
275
|
servers,
|
|
254
276
|
});
|
|
255
277
|
}
|
|
256
|
-
const
|
|
278
|
+
const server = servers[hit.leg];
|
|
279
|
+
const versions = hit.value.map((r) => r.version ?? '1');
|
|
257
280
|
const latestVersion = versions.at(-1) ?? '1';
|
|
258
281
|
if (requestedVersion !== undefined && !versions.includes(requestedVersion)) {
|
|
259
282
|
throw ctx.fail('version_not_found', `${doi} has no version ${requestedVersion} on ${server} — available versions: ${versions.join(', ')}.`, {
|
|
@@ -264,7 +287,47 @@ export const biorxivGetFulltextTool = tool('biorxiv_get_fulltext', {
|
|
|
264
287
|
});
|
|
265
288
|
}
|
|
266
289
|
const version = requestedVersion ?? latestVersion;
|
|
267
|
-
|
|
290
|
+
// The page is requested whatever is left of the budget — none at all still
|
|
291
|
+
// serves a cached extraction — so resolution's share is measured here.
|
|
292
|
+
const pageBudgetMs = remainingBudgetMs(deadline);
|
|
293
|
+
const lookupMs = CALL_BUDGET_MS - pageBudgetMs;
|
|
294
|
+
const result = await getBiorxivFullTextService()
|
|
295
|
+
.fetchFullText(server, doi, version, deadline, ctx)
|
|
296
|
+
.catch((err) => {
|
|
297
|
+
// A fetch the caller's cancellation stopped is that cancellation.
|
|
298
|
+
ctx.signal.throwIfAborted();
|
|
299
|
+
// Only a page that never answered — a timeout, a 5xx, a network error, the
|
|
300
|
+
// budget running out — is the retryable outage resolution reports, on the
|
|
301
|
+
// other origin. An origin 4xx or an extractor rejection keeps its own code.
|
|
302
|
+
if (!(err instanceof McpError && defaultIsTransient(err)))
|
|
303
|
+
throw err;
|
|
304
|
+
// The slow lookup left the page too little of the budget to answer in:
|
|
305
|
+
// that, not the page, is what failed.
|
|
306
|
+
if (lookupMs > pageBudgetMs && endedOnCallBudget(err)) {
|
|
307
|
+
const unanswered = servers.filter((_, i) => outcomes[i]?.status !== 'fulfilled');
|
|
308
|
+
const resolved = `before ${server} resolved the DOI${unanswered.length > 0 ? ` (${unanswered.join(' and ')} did not answer)` : ''}`;
|
|
309
|
+
throw ctx.fail('upstream_unavailable', err.data.retryAttempts === 0
|
|
310
|
+
? `Version lookup for ${doi} used the call's whole ${CALL_BUDGET_MS / 1000} s time budget ${resolved}, so the ${server} article page was never requested.`
|
|
311
|
+
: `Version lookup for ${doi} used ${describeDuration(lookupMs)} of the call's ${CALL_BUDGET_MS / 1000} s time budget ${resolved}, so the ${server} article page got only the remaining ${describeDuration(pageBudgetMs)} and had not answered when the budget ran out.`, {
|
|
312
|
+
doi,
|
|
313
|
+
server,
|
|
314
|
+
version,
|
|
315
|
+
recovery: {
|
|
316
|
+
hint: `Call biorxiv_get_fulltext again with server="${server}" — the preprint is on ${server}, so the retry spends the call's whole time budget there: the version lookup, then the article page.`,
|
|
317
|
+
},
|
|
318
|
+
}, { cause: err });
|
|
319
|
+
}
|
|
320
|
+
throw ctx.fail('upstream_unavailable', `The ${server} article page for ${doi} v${version} did not answer — ${err instanceof Error ? err.message : String(err)}`, {
|
|
321
|
+
doi,
|
|
322
|
+
server,
|
|
323
|
+
version,
|
|
324
|
+
recovery: {
|
|
325
|
+
hint: `Retry after a short delay — the www.${server}.org article page did not answer. api.biorxiv.org resolved this preprint, so biorxiv_get_preprint still serves its title, abstract, and metadata meanwhile.`,
|
|
326
|
+
},
|
|
327
|
+
}, { cause: err });
|
|
328
|
+
});
|
|
329
|
+
// A page served from the cache settles even after the caller has gone.
|
|
330
|
+
ctx.signal.throwIfAborted();
|
|
268
331
|
if (result.kind === 'unavailable') {
|
|
269
332
|
if (result.reason === 'rate_limited') {
|
|
270
333
|
// Dynamic recovery — the origin's own wait is more actionable than the
|
|
@@ -277,7 +340,7 @@ export const biorxivGetFulltextTool = tool('biorxiv_get_fulltext', {
|
|
|
277
340
|
// while that origin is limiting too sends them back into the limit, and a
|
|
278
341
|
// retry re-runs resolution, so the wait must clear whichever origin asked
|
|
279
342
|
// for the longer one.
|
|
280
|
-
const metadataLimit = findRateLimit(
|
|
343
|
+
const metadataLimit = findRateLimit(rejections.map((f) => f.error));
|
|
281
344
|
const waits = [result.retryAfter, metadataLimit?.retryAfter].filter((n) => n !== undefined);
|
|
282
345
|
const retryAfter = waits.length > 0 ? Math.max(...waits) : undefined;
|
|
283
346
|
const wait = describeWait(retryAfter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biorxiv-get-fulltext.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEjG,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,EAAE;IACjE,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,u3CAAu3C;IACz3C,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAExD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QAC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