@cyanheads/biorxiv-mcp-server 0.2.7 → 0.3.0

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.
Files changed (58) hide show
  1. package/AGENTS.md +15 -11
  2. package/CLAUDE.md +15 -11
  3. package/README.md +22 -11
  4. package/changelog/0.2.x/0.2.7.md +3 -2
  5. package/changelog/0.2.x/0.2.8.md +26 -0
  6. package/changelog/0.3.x/0.3.0.md +22 -0
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts +18 -5
  10. package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js +91 -34
  12. package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts +5 -3
  14. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js +36 -24
  16. package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts +19 -9
  18. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js +135 -47
  20. package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.js +1 -1
  22. package/dist/mcp-server/tools/definitions/biorxiv-list-categories.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts +21 -3
  24. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js +171 -76
  26. package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts +21 -2
  28. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js +99 -25
  30. package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/index.d.ts +41 -14
  32. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  33. package/dist/services/biorxiv/biorxiv-service.d.ts +35 -7
  34. package/dist/services/biorxiv/biorxiv-service.d.ts.map +1 -1
  35. package/dist/services/biorxiv/biorxiv-service.js +137 -61
  36. package/dist/services/biorxiv/biorxiv-service.js.map +1 -1
  37. package/dist/services/biorxiv/types.d.ts +27 -2
  38. package/dist/services/biorxiv/types.d.ts.map +1 -1
  39. package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts +5 -2
  40. package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts.map +1 -1
  41. package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js +5 -6
  42. package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js.map +1 -1
  43. package/dist/services/europe-pmc/europe-pmc-service.d.ts +23 -6
  44. package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -1
  45. package/dist/services/europe-pmc/europe-pmc-service.js +118 -19
  46. package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -1
  47. package/dist/services/europe-pmc/types.d.ts +9 -3
  48. package/dist/services/europe-pmc/types.d.ts.map +1 -1
  49. package/dist/services/shared.d.ts +83 -10
  50. package/dist/services/shared.d.ts.map +1 -1
  51. package/dist/services/shared.js +287 -16
  52. package/dist/services/shared.js.map +1 -1
  53. package/dist/services/upstream-text-tables.d.ts +44 -0
  54. package/dist/services/upstream-text-tables.d.ts.map +1 -0
  55. package/dist/services/upstream-text-tables.js +296 -0
  56. package/dist/services/upstream-text-tables.js.map +1 -0
  57. package/package.json +4 -4
  58. package/server.json +3 -3
@@ -2,7 +2,18 @@
2
2
  * @fileoverview biorxiv_list_recent tool — lists preprints posted or revised
3
3
  * within a date interval. Fans out to both bioRxiv and medRxiv when
4
4
  * server="both". Category filtering is applied server-side via the ?category=
5
- * query param. Returns 30 results per page (API-fixed); use cursor to paginate.
5
+ * query param, in the API's lowercase spelling. The API answers a category it
6
+ * does not filter on with its unfiltered listing (echoing category "all"), so
7
+ * such a leg is dropped with a notice, and a call left with no filtered page
8
+ * raises invalid_category. A funder filter (a ROR ID, normalized and
9
+ * checksum-validated before any call) is sent alongside category; only bioRxiv
10
+ * records carry funder data, so it narrows server="both" to bioRxiv with a
11
+ * notice and is rejected with server="medrxiv". An ID the API holds no funder
12
+ * record for raises invalid_funder rather than reading as an empty page.
13
+ * Returns 30 results per page (API-fixed); use cursor to paginate. Abstracts
14
+ * are about three quarters of a page and a listing is read for its titles and
15
+ * metadata, so they are omitted unless include_abstract is true; nothing else
16
+ * in a record changes.
6
17
  * When server="both", per-server pagination state is surfaced independently,
7
18
  * including per-server cursor exhaustion: the two servers hold different result
8
19
  * counts, so one cursor can be valid for one and past the end for the other.
@@ -20,7 +31,7 @@
20
31
  import { tool, z } from '@cyanheads/mcp-ts-core';
21
32
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
22
33
  import { getBiorxivApiService } from '../../../services/biorxiv/biorxiv-service.js';
23
- import { describeWait, findRateLimit, isValidCalendarDate } from '../../../services/shared.js';
34
+ import { describeWait, escapeMarkdown, findRateLimit, isValidCalendarDate, normalizeRorId, } from '../../../services/shared.js';
24
35
  const DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
25
36
  const SERVERS = ['biorxiv', 'medrxiv'];
26
37
  const SERVER_LABEL = { biorxiv: 'bioRxiv', medrxiv: 'medRxiv' };
@@ -31,41 +42,44 @@ function errorMessage(reason) {
31
42
  function serverLabels(servers) {
32
43
  return servers.map((s) => SERVER_LABEL[s]).join(' and ');
33
44
  }
45
+ // Upstream free text is escaped as it is interpolated so it renders literally —
46
+ // the abstract opens its own line, where `1. ` would start a list. DOIs and
47
+ // URLs stay raw because agents copy them back into calls.
34
48
  function formatPreprint(p) {
35
49
  const lines = [];
36
- lines.push(`### ${p.title ?? p.doi}`);
50
+ lines.push(`### ${p.title ? escapeMarkdown(p.title) : p.doi}`);
37
51
  lines.push(`**DOI:** ${p.doi}`);
38
52
  if (p.date)
39
53
  lines.push(`**Date:** ${p.date}`);
40
54
  if (p.version)
41
55
  lines.push(`**Version:** ${p.version}`);
42
56
  if (p.type)
43
- lines.push(`**Type:** ${p.type}`);
57
+ lines.push(`**Type:** ${escapeMarkdown(p.type)}`);
44
58
  if (p.server)
45
59
  lines.push(`**Server:** ${p.server}`);
46
60
  if (p.category)
47
- lines.push(`**Category:** ${p.category}`);
61
+ lines.push(`**Category:** ${escapeMarkdown(p.category)}`);
48
62
  if (p.license)
49
- lines.push(`**License:** ${p.license}`);
63
+ lines.push(`**License:** ${escapeMarkdown(p.license)}`);
50
64
  if (p.authors)
51
- lines.push(`**Authors:** ${p.authors}`);
65
+ lines.push(`**Authors:** ${escapeMarkdown(p.authors)}`);
52
66
  if (p.authorCorresponding)
53
- lines.push(`**Corresponding:** ${p.authorCorresponding}`);
67
+ lines.push(`**Corresponding:** ${escapeMarkdown(p.authorCorresponding)}`);
54
68
  if (p.authorCorrespondingInstitution)
55
- lines.push(`**Institution:** ${p.authorCorrespondingInstitution}`);
56
- if (p.funder)
57
- lines.push(`**Funder:** ${p.funder}`);
69
+ lines.push(`**Institution:** ${escapeMarkdown(p.authorCorrespondingInstitution)}`);
70
+ if (p.awards)
71
+ lines.push(`**Awards:** ${escapeMarkdown(p.awards.join('; '))}`);
58
72
  if (p.jatsxmlUrl)
59
73
  lines.push(`**JATS XML:** ${p.jatsxmlUrl}`);
60
74
  if (p.publishedJournalDoi)
61
75
  lines.push(`**Published DOI:** ${p.publishedJournalDoi}`);
62
76
  if (p.abstract)
63
- lines.push(`\n${p.abstract}`);
77
+ lines.push(`\n${escapeMarkdown(p.abstract)}`);
64
78
  return lines.join('\n');
65
79
  }
66
80
  export const biorxivListRecentTool = tool('biorxiv_list_recent', {
67
81
  title: 'List Recent Preprints',
68
- description: 'List preprints posted or revised within a date interval, optionally scoped to one server or a subject category. Returns 30 preprints per page (fixed by the API); pass `cursor` as an integer offset (0, 30, 60, …) to step through additional pages. When server="both" (default), per-server pagination state is returned separately — use each server\'s `cursor` field for independent advancement. One server failing under server="both" does not abort the call: the other server\'s page is still returned and the failed one is named in `failed[]`, marking the result set as partial rather than complete. Every attempted server failing is a different case and does abort the call, with a retryable upstream_unavailable (or rate_limited) error — an empty page would otherwise be indistinguishable from an interval that genuinely holds nothing. Call biorxiv_list_categories for valid category strings.',
82
+ description: 'List preprints posted or revised within a date interval, optionally scoped to one server or a subject category. Returns 30 preprints per page (fixed by the API); pass `cursor` as an integer offset (0, 30, 60, …) to step through additional pages. Abstracts are omitted by default to keep the page small — pass include_abstract: true for the whole page, or call biorxiv_get_preprint (up to 10 DOIs per call) for a few. When server="both" (default), per-server pagination state is returned separately — use each server\'s `cursor` field for independent advancement. One server failing under server="both" does not abort the call: the other server\'s page is still returned and the failed one is named in `failed[]`, marking the result set as partial rather than complete. Every attempted server failing is a different case and does abort the call, with a retryable upstream_unavailable (or rate_limited) error — an empty page would otherwise be indistinguishable from an interval that genuinely holds nothing. Call biorxiv_list_categories for valid category strings; a server that answers a category filter with its unfiltered listing is left out with a notice, and invalid_category is raised when no server applied it. `funder` limits the listing to bioRxiv preprints funded by that organization, given its ROR ID; an ID api.biorxiv.org has no funder record for raises invalid_funder rather than returning an empty page.',
69
83
  annotations: { readOnlyHint: true, openWorldHint: true },
70
84
  // biorxiv_search_preprints spells its date bounds date_from / date_to.
71
85
  inputAliases: { date_from: 'start_date', date_to: 'end_date' },
@@ -79,13 +93,21 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
79
93
  category: z
80
94
  .string()
81
95
  .optional()
82
- .describe('Subject category filter. Use biorxiv_list_categories for valid values.'),
96
+ .describe('Subject category filter, matched case-insensitively with "_" and "-" read as a space — "Cell Biology", "cell biology", "cell_biology", and "cell-biology" are the same filter. Use biorxiv_list_categories for valid values.'),
97
+ funder: z
98
+ .string()
99
+ .optional()
100
+ .describe('Funder filter: the funder\'s ROR ID, bare ("021nxhr62" for the US National Science Foundation) or as a URL ("https://ror.org/021nxhr62"). bioRxiv only — medRxiv records carry no funder data, so server="both" queries bioRxiv alone and server="medrxiv" is rejected. Combines with category. Look the ID up by name at ror.org.'),
83
101
  cursor: z
84
102
  .number()
85
103
  .int()
86
104
  .min(0)
87
105
  .default(0)
88
106
  .describe('Integer page offset (0, 30, 60, …). Defaults to 0 (first page).'),
107
+ include_abstract: z
108
+ .boolean()
109
+ .default(false)
110
+ .describe("Include each preprint's abstract. Defaults to false: abstracts make up about three quarters of a page, and every other field is returned either way."),
89
111
  }),
90
112
  output: z.object({
91
113
  preprints: z
@@ -105,8 +127,14 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
105
127
  license: z.string().optional().describe('License identifier.'),
106
128
  category: z.string().optional().describe('Subject category.'),
107
129
  jatsxmlUrl: z.string().optional().describe('URL to the JATS XML full-text.'),
108
- abstract: z.string().optional().describe('Abstract text.'),
109
- funder: z.string().optional().describe('Funder information.'),
130
+ abstract: z
131
+ .string()
132
+ .optional()
133
+ .describe('Abstract text. Present only when include_abstract is true.'),
134
+ awards: z
135
+ .array(z.string().describe('One award value as upstream records it.'))
136
+ .optional()
137
+ .describe('Grant award numbers from the funding statement, verbatim and deduplicated — one value can hold several grants run together without a separator. Absent when none. Funder names are not included: api.biorxiv.org attributes them to unrelated organizations.'),
110
138
  publishedJournalDoi: z
111
139
  .string()
112
140
  .optional()
@@ -140,7 +168,7 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
140
168
  .describe('True when this cursor is past medRxiv\'s last page: no records came back at a non-zero cursor. The API reports total 0 for an out-of-range cursor, so "total" is not the interval total here — step back to a lower cursor to read it.'),
141
169
  })
142
170
  .optional()
143
- .describe('medRxiv pagination state. Present when server is "medrxiv" or "both".'),
171
+ .describe('medRxiv pagination state. Present when server is "medrxiv" or "both", except under a funder filter, which queries bioRxiv only.'),
144
172
  })
145
173
  .describe('Per-server pagination state. Advance each server independently.'),
146
174
  failed: z
@@ -159,7 +187,7 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
159
187
  notice: z
160
188
  .string()
161
189
  .optional()
162
- .describe('Guidance on how to read this result set: which servers did not answer, which cursors are past the end, and — when nothing came back — the applied filters and how to broaden them. All applicable qualifications are composed into one string.'),
190
+ .describe('Guidance on how to read this result set: which servers did not answer, which ignored the category filter (their unfiltered records are left out), that a funder filter limited server="both" to bioRxiv, which cursors are past the end, and — when nothing came back — the applied filters and how to broaden them. All applicable qualifications are composed into one string.'),
163
191
  categoryNote: z
164
192
  .string()
165
193
  .optional()
@@ -175,9 +203,15 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
175
203
  {
176
204
  reason: 'invalid_category',
177
205
  code: JsonRpcErrorCode.ValidationError,
178
- when: 'The supplied category string is not in the taxonomy.',
206
+ when: "The category is not in the requested server's taxonomy, or api.biorxiv.org ignored it and returned the unfiltered listing on every server that answered.",
179
207
  recovery: 'Call biorxiv_list_categories to get valid category strings and retry.',
180
208
  },
209
+ {
210
+ reason: 'invalid_funder',
211
+ code: JsonRpcErrorCode.ValidationError,
212
+ when: 'funder is not a well-formed ROR ID (pattern or checksum), is combined with server="medrxiv", or is a ROR ID api.biorxiv.org has no funder record for.',
213
+ recovery: 'Look up the funder by name at ror.org and pass its ROR ID, bare (021nxhr62) or as https://ror.org/021nxhr62, with server "biorxiv" or "both".',
214
+ },
181
215
  {
182
216
  reason: 'upstream_unavailable',
183
217
  code: JsonRpcErrorCode.ServiceUnavailable,
@@ -200,6 +234,7 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
200
234
  server: input.server,
201
235
  cursor: input.cursor,
202
236
  category: input.category,
237
+ funder: input.funder,
203
238
  });
204
239
  // Validate dates: shape first, then real-calendar-date (rejects overflow days
205
240
  // like 2024-02-30 that the shape regex accepts but no calendar holds), then range.
@@ -216,17 +251,32 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
216
251
  if (input.start_date > input.end_date) {
217
252
  throw ctx.fail('invalid_date_range', `start_date (${input.start_date}) must be on or before end_date (${input.end_date}).`, { ...ctx.recoveryFor('invalid_date_range') });
218
253
  }
219
- // Validate category — trim before checking, and validate against the target server(s)
220
- const trimmedCategory = input.category?.trim();
221
- if (trimmedCategory) {
222
- const service = getBiorxivApiService();
223
- if (!service.isValidCategory(trimmedCategory, input.server)) {
224
- const serverLabel = input.server === 'both' ? 'bioRxiv or medRxiv' : input.server;
225
- throw ctx.fail('invalid_category', `Category "${trimmedCategory}" is not valid for ${serverLabel}.`, { ...ctx.recoveryFor('invalid_category') });
226
- }
254
+ // Validate funder before any call. The API takes only the bare 9-character ROR
255
+ // ID, and a mistyped one fails its checksum here rather than upstream.
256
+ const funderInput = input.funder?.trim();
257
+ const funder = funderInput ? normalizeRorId(funderInput) : undefined;
258
+ if (funderInput && !funder) {
259
+ throw ctx.fail('invalid_funder', `"${funderInput}" is not a valid ROR ID — expected 9 characters: 0, six letters or digits, and two checksum digits (e.g. 021nxhr62), bare or after https://ror.org/.`, { funder: funderInput, ...ctx.recoveryFor('invalid_funder') });
260
+ }
261
+ if (funder && input.server === 'medrxiv') {
262
+ throw ctx.fail('invalid_funder', 'The funder filter applies to bioRxiv only — medRxiv records carry no funder data, so a medRxiv funder listing is always empty.', {
263
+ funder,
264
+ recovery: {
265
+ hint: 'Set server to "biorxiv" or "both" (which queries bioRxiv alone under a funder filter), or omit funder to list medRxiv.',
266
+ },
267
+ });
227
268
  }
269
+ // Only bioRxiv carries funder data, so a funder filter narrows "both" to bioRxiv.
270
+ const target = funder && input.server === 'both' ? 'biorxiv' : input.server;
271
+ // Validate category — trim before checking, and validate against the target server(s)
228
272
  const service = getBiorxivApiService();
229
- const category = trimmedCategory || undefined;
273
+ const category = input.category?.trim() || undefined;
274
+ if (category && !service.isValidCategory(category, target)) {
275
+ const serverLabel = target === 'both' ? 'bioRxiv or medRxiv' : target;
276
+ const scope = target === input.server ? '' : ' (a funder filter queries bioRxiv only)';
277
+ throw ctx.fail('invalid_category', `Category "${category}" is not valid for ${serverLabel}${scope}.`, { ...ctx.recoveryFor('invalid_category') });
278
+ }
279
+ const filters = { category, funder };
230
280
  const pagination = {};
231
281
  const failed = [];
232
282
  // Raw rejection values alongside failed[], so the all-failed branch can tell
@@ -235,6 +285,11 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
235
285
  // ctx.enrich.notice is last-wins, so every qualification that applies to this
236
286
  // result set is collected here and flushed as one string before returning.
237
287
  const notices = [];
288
+ // The absent medRxiv entry needs the same explanation a server-exclusive
289
+ // category gets, or it reads as medRxiv having been skipped by accident.
290
+ if (target !== input.server) {
291
+ notices.push('The funder filter applies to bioRxiv only — medRxiv records carry no funder data — so only bioRxiv was queried and there is no medRxiv pagination entry.');
292
+ }
238
293
  function toPaginationEntry(r) {
239
294
  const nextCursor = r.pagination.cursor + r.preprints.length < r.pagination.total
240
295
  ? r.pagination.cursor + 30
@@ -249,62 +304,96 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
249
304
  };
250
305
  }
251
306
  let allPreprints = [];
307
+ // The API answers a category it does not filter on with its unfiltered
308
+ // listing, echoing category "all". That page is never returned as filtered:
309
+ // a leg that did so is dropped, and a call left with no filtered page fails.
310
+ const ignoredCategory = (servers) => ctx.fail('invalid_category', `api.biorxiv.org ignored category "${category}" on ${serverLabels(servers)} and returned its unfiltered listing, so no filtered page is available.`, {
311
+ category,
312
+ servers,
313
+ recovery: {
314
+ hint: `Omit category to page the unfiltered listing, or pick a different category from biorxiv_list_categories — api.biorxiv.org is not filtering on "${category}".`,
315
+ },
316
+ });
252
317
  // When server="both" and a category is given, check membership per-server once.
253
318
  // A category that exists in only one taxonomy (inBx !== inMx) collapses the
254
319
  // request onto that server alone — querying the other would return an
255
320
  // unfiltered page mixed in with the filtered one under a filtered-looking
256
- // request. Shared categories (Epidemiology, Pathology) and no-category
257
- // requests still fan out to both servers.
258
- const inBx = input.server === 'both' && !!category && service.isValidCategory(category, 'biorxiv');
259
- const inMx = input.server === 'both' && !!category && service.isValidCategory(category, 'medrxiv');
321
+ // request. Shared categories (Pathology) and no-category requests still fan
322
+ // out to both servers.
323
+ const inBx = target === 'both' && !!category && service.isValidCategory(category, 'biorxiv');
324
+ const inMx = target === 'both' && !!category && service.isValidCategory(category, 'medrxiv');
260
325
  const exclusiveServer = inBx === inMx ? undefined : inBx ? 'biorxiv' : 'medrxiv';
261
- if (input.server === 'both' && category && exclusiveServer) {
326
+ if (target === 'both' && category && exclusiveServer) {
262
327
  ctx.enrich({
263
328
  categoryNote: exclusiveServer === 'biorxiv'
264
329
  ? `Category "${category}" is specific to bioRxiv — only bioRxiv was queried. medRxiv was not included because its taxonomy has no such category.`
265
330
  : `Category "${category}" is specific to medRxiv — only medRxiv was queried. bioRxiv was not included because its taxonomy has no such category.`,
266
331
  });
267
332
  }
268
- if (exclusiveServer) {
269
- // "both" request with a server-exclusive category → query only the owning
270
- // server, so the page never mixes filtered with unfiltered records.
271
- const r = await service.getListing(exclusiveServer, input.start_date, input.end_date, input.cursor, category, ctx);
272
- pagination[exclusiveServer] = toPaginationEntry(r);
333
+ // One leg: an explicit server, or a "both" request collapsed onto bioRxiv by a
334
+ // funder filter or onto the server owning a server-exclusive category.
335
+ const singleServer = exclusiveServer ?? (target === 'both' ? undefined : target);
336
+ if (singleServer) {
337
+ const r = await service.getListing(singleServer, input.start_date, input.end_date, input.cursor, filters, ctx);
338
+ // No funder record means no filter was applied at all — the empty page
339
+ // says nothing about what the funder posted.
340
+ if (r.funderNotFound) {
341
+ throw ctx.fail('invalid_funder', `api.biorxiv.org has no funder record for ROR ID ${funder}, so it cannot filter on it — this is not an empty result.`, {
342
+ funder,
343
+ recovery: {
344
+ hint: `Confirm the ROR ID at ror.org and that it names the funding body itself. For a parent organization, try the ROR ID of the member institute that made the award, which api.biorxiv.org may hold on record instead.`,
345
+ },
346
+ });
347
+ }
348
+ if (r.categoryIgnored)
349
+ throw ignoredCategory([singleServer]);
350
+ pagination[singleServer] = toPaginationEntry(r);
273
351
  allPreprints = r.preprints;
274
352
  }
275
- else if (input.server === 'both') {
353
+ else {
276
354
  // Fan out to both servers. Any category here is shared by both taxonomies,
277
355
  // so it applies to each; with no category both return unfiltered pages.
278
- const [bxResult, mxResult] = await Promise.allSettled([
279
- service.getListing('biorxiv', input.start_date, input.end_date, input.cursor, category, ctx),
280
- service.getListing('medrxiv', input.start_date, input.end_date, input.cursor, category, ctx),
281
- ]);
282
- if (bxResult.status === 'fulfilled') {
283
- pagination.biorxiv = toPaginationEntry(bxResult.value);
284
- allPreprints.push(...bxResult.value.preprints);
285
- }
286
- else {
287
- ctx.log.warning('bioRxiv listing failed', { error: String(bxResult.reason) });
288
- failed.push({ server: 'biorxiv', error: errorMessage(bxResult.reason) });
289
- rejections.push(bxResult.reason);
290
- }
291
- if (mxResult.status === 'fulfilled') {
292
- pagination.medrxiv = toPaginationEntry(mxResult.value);
293
- allPreprints.push(...mxResult.value.preprints);
294
- }
295
- else {
296
- ctx.log.warning('medRxiv listing failed', { error: String(mxResult.reason) });
297
- failed.push({ server: 'medrxiv', error: errorMessage(mxResult.reason) });
298
- rejections.push(mxResult.reason);
356
+ // A funder filter never reaches this branch — it narrows the call to bioRxiv.
357
+ const settled = await Promise.allSettled(SERVERS.map((server) => service.getListing(server, input.start_date, input.end_date, input.cursor, filters, ctx)));
358
+ // Servers that answered but ignored the category filter — their pages are
359
+ // unfiltered, so they are left out rather than mixed in with filtered ones.
360
+ const ignored = [];
361
+ for (const [i, result] of settled.entries()) {
362
+ const server = SERVERS[i];
363
+ if (result.status === 'rejected') {
364
+ ctx.log.warning(`${SERVER_LABEL[server]} listing failed`, {
365
+ error: String(result.reason),
366
+ });
367
+ failed.push({ server, error: errorMessage(result.reason) });
368
+ rejections.push(result.reason);
369
+ }
370
+ else if (result.value.categoryIgnored) {
371
+ ctx.log.warning(`${SERVER_LABEL[server]} ignored the category filter`, { category });
372
+ ignored.push(server);
373
+ }
374
+ else {
375
+ pagination[server] = toPaginationEntry(result.value);
376
+ allPreprints.push(...result.value.preprints);
377
+ }
299
378
  }
300
- // Nothing answered. An empty page here is not a result — it is the absence
301
- // of one — and a caller branching on success-vs-error cannot tell the two
302
- // apart from a notice string. Raise the same retryable error the other
303
- // DOI-resolving tools raise for their own nothing-answered case.
304
- if (failed.length === SERVERS.length) {
305
- const message = `Neither bioRxiv nor medRxiv answered — ${failed
306
- .map((f) => `${SERVER_LABEL[f.server]}: ${f.error}`)
307
- .join('; ')}`;
379
+ // Every server that answered ignored the filter: there is no filtered page
380
+ // to return, and retrying will not produce one.
381
+ if (ignored.length === SERVERS.length)
382
+ throw ignoredCategory(ignored);
383
+ // Nothing usable came back and at least one server never answered. An
384
+ // empty page here is not a result — it is the absence of one — and a
385
+ // caller branching on success-vs-error cannot tell the two apart from a
386
+ // notice string. Raise the same retryable error the other DOI-resolving
387
+ // tools raise for their own nothing-answered case: the server that failed
388
+ // may still return a filtered page on retry.
389
+ if (failed.length + ignored.length === SERVERS.length) {
390
+ const detail = [
391
+ ...failed.map((f) => `${SERVER_LABEL[f.server]}: ${f.error}`),
392
+ ...ignored.map((s) => `${SERVER_LABEL[s]} ignored the category filter "${category}"`),
393
+ ].join('; ');
394
+ const message = ignored.length === 0
395
+ ? `Neither bioRxiv nor medRxiv answered — ${detail}`
396
+ : `No server returned a usable page — ${detail}`;
308
397
  const servers = failed.map((f) => f.server);
309
398
  // A rate limit outranks a generic outage: both say "retry", but only one
310
399
  // says when, and retrying sooner would land inside the same limit.
@@ -329,6 +418,12 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
329
418
  const labels = serverLabels(failed.map((f) => f.server));
330
419
  notices.push(`${labels} did not answer, so this result set is partial — it holds no ${labels} records. See failed[] for the error and retry to include them.`);
331
420
  }
421
+ // An ignored filter answered, so it is not in failed[] and a retry will not
422
+ // change it — but its absent pagination entry needs the same explanation.
423
+ if (ignored.length > 0) {
424
+ const labels = serverLabels(ignored);
425
+ notices.push(`${labels} ignored the category filter "${category}" and returned its unfiltered listing, so its records were left out — only the filtered results are shown.`);
426
+ }
332
427
  // One server's cursor overshot while the other still returned records. The
333
428
  // fully-empty branch below does not fire, so without this nothing qualifies
334
429
  // the exhausted server's total 0 — it reads as "no preprints in the interval".
@@ -337,11 +432,6 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
337
432
  notices.push(`Cursor ${input.cursor} is past the last available page on ${serverLabels(exhaustedServers)} — that entry is marked exhausted and its total of 0 is an out-of-range artifact, not the interval total. Lower the cursor to page that server.`);
338
433
  }
339
434
  }
340
- else {
341
- const r = await service.getListing(input.server, input.start_date, input.end_date, input.cursor, category, ctx);
342
- pagination[input.server] = toPaginationEntry(r);
343
- allPreprints = r.preprints;
344
- }
345
435
  // "Nothing here" is a claim about what the servers reported, and by this point
346
436
  // one has: every branch above either records a pagination entry or throws.
347
437
  if (allPreprints.length === 0) {
@@ -353,16 +443,21 @@ export const biorxivListRecentTool = tool('biorxiv_list_recent', {
353
443
  const filterDesc = [
354
444
  `dates ${input.start_date}–${input.end_date}`,
355
445
  category ? `category "${category}"` : null,
356
- input.server !== 'both' ? `server "${input.server}"` : null,
446
+ funder ? `funder ${funder}` : null,
447
+ target !== 'both' ? `server "${target}"` : null,
357
448
  ]
358
449
  .filter(Boolean)
359
450
  .join(', ');
360
- notices.push(`No preprints found for ${filterDesc}. Try widening the date range or removing the category filter.`);
451
+ const removable = [category && 'category', funder && 'funder'].filter(Boolean).join(' or ');
452
+ notices.push(`No preprints found for ${filterDesc}. Try widening the date range${removable ? ` or removing the ${removable} filter` : ''}.`);
361
453
  }
362
454
  }
363
455
  if (notices.length > 0)
364
456
  ctx.enrich.notice(notices.join(' '));
365
- return { preprints: allPreprints, pagination, failed };
457
+ const preprints = input.include_abstract
458
+ ? allPreprints
459
+ : allPreprints.map(({ abstract: _abstract, ...rest }) => rest);
460
+ return { preprints, pagination, failed };
366
461
  },
367
462
  format: (result) => {
368
463
  const lines = [];
@@ -1 +1 @@
1
- {"version":3,"file":"biorxiv-list-recent.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-list-recent.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;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,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAExF,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAEzC,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC;AAChD,MAAM,YAAY,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAW,CAAC;AAEzE,SAAS,YAAY,CAAC,MAAe;IACnC,OAAO,MAAM,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC;AAED,8EAA8E;AAC9E,SAAS,YAAY,CAAC,OAAiC;IACrD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,cAAc,CAAC,CAAmB;IACzC,MAAM,K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,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAqB,CAAC,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"biorxiv-list-recent.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-list-recent.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,EACL,YAAY,EACZ,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAEzC,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC;AAChD,MAAM,YAAY,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAW,CAAC;AAEzE,SAAS,YAAY,CAAC,MAAe;IACnC,OAAO,MAAM,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC;AAED,8EAA8E;AAC9E,SAAS,YAAY,CAAC,OAAiC;IACrD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC3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CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;QAED,6EAA6E;QAC7E,4EAA4E;QAC5E,gCAAgC;QAChC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CACR,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,gEAAgE,CAAC,CAAC,KAAK,GAAG,CACtG,CAAC;QACJ,CAAC;QAED,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,mBAAmB,MAAM,CAAC,SAAS,CAAC,MAAM,SAAS,CAAC,CAAC;QAChE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAqB,CAAC,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -17,6 +17,18 @@
17
17
  * is still there to fall back on, while the EuropePMC search itself is this
18
18
  * tool's primary call and has nothing to degrade to, so a 429 there raises a
19
19
  * retryable `rate_limited` error carrying the origin's Retry-After wait.
20
+ *
21
+ * EuropePMC sometimes answers HTTP 200 with no result list. The service retries
22
+ * that body; one that persists fails the call rather than reading as zero
23
+ * matches — `invalid_cursor_mark` when a cursor page was requested (a malformed
24
+ * token draws that body every time), `search_unavailable` on a first page.
25
+ *
26
+ * `include_abstract` (default true) drops only the abstract, from enriched and
27
+ * fallback records alike. The ranked search's `lite` records carry no abstract,
28
+ * so when abstracts are requested and any record fell back to EuropePMC
29
+ * metadata, their abstracts come from one DOI-keyed `core` lookup; a fully
30
+ * enriched page never makes it. That lookup degrades like enrichment does — a
31
+ * failure leaves those records without an abstract and says so in the notice.
20
32
  * @module mcp-server/tools/definitions/biorxiv-search-preprints.tool
21
33
  */
22
34
  import { z } from '@cyanheads/mcp-ts-core';
@@ -32,6 +44,7 @@ export declare const biorxivSearchPreprintsTool: import("@cyanheads/mcp-ts-core"
32
44
  date_from: z.ZodOptional<z.ZodString>;
33
45
  date_to: z.ZodOptional<z.ZodString>;
34
46
  limit: z.ZodDefault<z.ZodNumber>;
47
+ include_abstract: z.ZodDefault<z.ZodBoolean>;
35
48
  cursor_mark: z.ZodOptional<z.ZodString>;
36
49
  }, z.core.$strip>, z.ZodObject<{
37
50
  preprints: z.ZodArray<z.ZodObject<{
@@ -47,7 +60,7 @@ export declare const biorxivSearchPreprintsTool: import("@cyanheads/mcp-ts-core"
47
60
  category: z.ZodOptional<z.ZodString>;
48
61
  server: z.ZodOptional<z.ZodString>;
49
62
  jatsxmlUrl: z.ZodOptional<z.ZodString>;
50
- funder: z.ZodOptional<z.ZodString>;
63
+ awards: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
64
  publishedJournalDoi: z.ZodOptional<z.ZodString>;
52
65
  abstract: z.ZodOptional<z.ZodString>;
53
66
  enriched: z.ZodBoolean;
@@ -67,8 +80,14 @@ export declare const biorxivSearchPreprintsTool: import("@cyanheads/mcp-ts-core"
67
80
  }, {
68
81
  readonly reason: "search_unavailable";
69
82
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
70
- readonly when: "EuropePMC search endpoint is unreachable or returns a server error.";
83
+ readonly when: "EuropePMC search endpoint is unreachable, returns a server error, or answers a first-page search without a result list on every retry.";
71
84
  readonly recovery: "EuropePMC may be temporarily unavailable. Retry after a short delay or use biorxiv_list_recent with a date range instead.";
85
+ }, {
86
+ readonly reason: "invalid_cursor_mark";
87
+ readonly code: JsonRpcErrorCode.ValidationError;
88
+ readonly retryable: false;
89
+ readonly when: "EuropePMC answers a cursor_mark page request without a result list on every retry — the token is malformed or not one EuropePMC issued.";
90
+ readonly recovery: "Pass the nextCursorMark from the previous page exactly as returned, or omit cursor_mark (or pass \"*\") to restart from the first page.";
72
91
  }, {
73
92
  readonly reason: "rate_limited";
74
93
  readonly code: JsonRpcErrorCode.RateLimited;
@@ -1 +1 @@
1
- {"version":3,"file":"biorxiv-search-preprints.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-search-preprints.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA2EjE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAobrC,CAAC"}
1
+ {"version":3,"file":"biorxiv-search-preprints.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/biorxiv-search-preprints.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAoF3E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+frC,CAAC"}