@cyanheads/pubmed-mcp-server 2.10.8 → 2.10.10

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 (67) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/README.md +6 -4
  4. package/dist/mcp-server/tools/definitions/_text.d.ts +23 -1
  5. package/dist/mcp-server/tools/definitions/_text.d.ts.map +1 -1
  6. package/dist/mcp-server/tools/definitions/_text.js +25 -1
  7. package/dist/mcp-server/tools/definitions/_text.js.map +1 -1
  8. package/dist/mcp-server/tools/definitions/fetch-fulltext.tool.d.ts +35 -0
  9. package/dist/mcp-server/tools/definitions/fetch-fulltext.tool.d.ts.map +1 -1
  10. package/dist/mcp-server/tools/definitions/fetch-fulltext.tool.js +657 -44
  11. package/dist/mcp-server/tools/definitions/fetch-fulltext.tool.js.map +1 -1
  12. package/dist/mcp-server/tools/definitions/find-related.tool.d.ts +8 -0
  13. package/dist/mcp-server/tools/definitions/find-related.tool.d.ts.map +1 -1
  14. package/dist/mcp-server/tools/definitions/find-related.tool.js +131 -23
  15. package/dist/mcp-server/tools/definitions/find-related.tool.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/lookup-mesh.tool.d.ts +6 -0
  17. package/dist/mcp-server/tools/definitions/lookup-mesh.tool.d.ts.map +1 -1
  18. package/dist/mcp-server/tools/definitions/lookup-mesh.tool.js +14 -3
  19. package/dist/mcp-server/tools/definitions/lookup-mesh.tool.js.map +1 -1
  20. package/dist/mcp-server/tools/definitions/search-articles.tool.d.ts +6 -0
  21. package/dist/mcp-server/tools/definitions/search-articles.tool.d.ts.map +1 -1
  22. package/dist/mcp-server/tools/definitions/search-articles.tool.js +15 -3
  23. package/dist/mcp-server/tools/definitions/search-articles.tool.js.map +1 -1
  24. package/dist/mcp-server/tools/definitions/spell-check.tool.d.ts +6 -0
  25. package/dist/mcp-server/tools/definitions/spell-check.tool.d.ts.map +1 -1
  26. package/dist/mcp-server/tools/definitions/spell-check.tool.js +15 -3
  27. package/dist/mcp-server/tools/definitions/spell-check.tool.js.map +1 -1
  28. package/dist/services/error-contracts.d.ts +22 -2
  29. package/dist/services/error-contracts.d.ts.map +1 -1
  30. package/dist/services/error-contracts.js +24 -2
  31. package/dist/services/error-contracts.js.map +1 -1
  32. package/dist/services/europe-pmc/europe-pmc-service.d.ts +3 -3
  33. package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -1
  34. package/dist/services/europe-pmc/europe-pmc-service.js +8 -16
  35. package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -1
  36. package/dist/services/ncbi/parsing/ordered-xml-parser-options.d.ts +44 -0
  37. package/dist/services/ncbi/parsing/ordered-xml-parser-options.d.ts.map +1 -0
  38. package/dist/services/ncbi/parsing/ordered-xml-parser-options.js +41 -0
  39. package/dist/services/ncbi/parsing/ordered-xml-parser-options.js.map +1 -0
  40. package/dist/services/ncbi/parsing/pmc-article-parser.d.ts +70 -10
  41. package/dist/services/ncbi/parsing/pmc-article-parser.d.ts.map +1 -1
  42. package/dist/services/ncbi/parsing/pmc-article-parser.js +795 -79
  43. package/dist/services/ncbi/parsing/pmc-article-parser.js.map +1 -1
  44. package/dist/services/ncbi/parsing/pmc-xml-helpers.d.ts +18 -0
  45. package/dist/services/ncbi/parsing/pmc-xml-helpers.d.ts.map +1 -1
  46. package/dist/services/ncbi/parsing/pmc-xml-helpers.js +39 -3
  47. package/dist/services/ncbi/parsing/pmc-xml-helpers.js.map +1 -1
  48. package/dist/services/ncbi/response-handler.d.ts +3 -9
  49. package/dist/services/ncbi/response-handler.d.ts.map +1 -1
  50. package/dist/services/ncbi/response-handler.js +6 -29
  51. package/dist/services/ncbi/response-handler.js.map +1 -1
  52. package/dist/services/ncbi/types.d.ts +82 -0
  53. package/dist/services/ncbi/types.d.ts.map +1 -1
  54. package/dist/services/openalex/api-client.d.ts +13 -4
  55. package/dist/services/openalex/api-client.d.ts.map +1 -1
  56. package/dist/services/openalex/api-client.js +19 -8
  57. package/dist/services/openalex/api-client.js.map +1 -1
  58. package/dist/services/openalex/openalex-service.d.ts +34 -17
  59. package/dist/services/openalex/openalex-service.d.ts.map +1 -1
  60. package/dist/services/openalex/openalex-service.js +119 -35
  61. package/dist/services/openalex/openalex-service.js.map +1 -1
  62. package/dist/services/openalex/types.d.ts +34 -1
  63. package/dist/services/openalex/types.d.ts.map +1 -1
  64. package/dist/services/openalex/types.js +20 -0
  65. package/dist/services/openalex/types.js.map +1 -1
  66. package/package.json +1 -1
  67. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** @cyanheads/pubmed-mcp-server
4
- **Version:** 2.10.8
4
+ **Version:** 2.10.10
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.8`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
 
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** @cyanheads/pubmed-mcp-server
4
- **Version:** 2.10.8
4
+ **Version:** 2.10.10
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.8`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
 
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- [![Version](https://img.shields.io/badge/Version-2.10.8-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/pubmed-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/pubmed-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/pubmed-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
12
+ [![Version](https://img.shields.io/badge/Version-2.10.10-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/pubmed-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/pubmed-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/pubmed-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
13
13
 
14
14
  </div>
15
15
 
@@ -85,11 +85,13 @@ Fetch full-text articles via a three-stage chain: NCBI PMC EFetch → Europe PMC
85
85
  - Europe PMC layer (enabled by default; disable with `EUROPEPMC_ENABLED=false`) recovers PMC-counterpart records that NCBI PMC EFetch missed, and resolves DOI input to PMC counterparts when one exists. EPMC's `fullTextXML` is PMC-keyed, so preprints (PPR), patents (PAT), and Agricola (AGR) are reachable via `pubmed_europepmc_search` for metadata but have no full text via this chain.
86
86
  - Unpaywall layer (enabled by setting `UNPAYWALL_EMAIL`) resolves DOIs to legal OA copies; extracts HTML landing pages to Markdown via Defuddle or PDFs to text via unpdf
87
87
  - Discriminated output contract — `source: "pmc"` (structured sections, regardless of whether it came from PMC or EPMC) or `source: "unpaywall"` (best-effort body + `contentFormat`: `html-markdown` or `pdf-text`)
88
- - Structured unavailable reasons (`not-found`, `no-pmc-fallback-disabled`, `no-epmc-fulltext`, `no-body`, `no-doi`, `no-oa`, `fetch-failed`, `parse-failed`, `service-error`) so callers can retry or explain to users without parsing text
88
+ - Structured unavailable reasons (`not-found`, `no-pmc-fallback-disabled`, `no-epmc-fulltext`, `no-body`, `no-doi`, `doi-lookup-failed`, `no-oa`, `fetch-failed`, `parse-failed`, `service-error`) so callers can retry or explain to users without parsing text. `no-doi` and `doi-lookup-failed` are the settled and unsettled halves of the same gap: the first means the DOI lookup ran and the record has none, the second that the lookup itself errored, so a DOI may well exist and the request is worth retrying
89
89
  - An `unavailable` entry also carries `unqueriedTiers` when the chain skipped a tier this deployment has not configured and that tier could have served the id — the search was incomplete, and a deployment with those tiers configured may still resolve it
90
90
  - Each `unavailable` entry carries `idType` (`pmid` / `pmcid` / `doi`) and `triedTiers` — per-tier outcomes (`not-attempted`, `miss`, `no-fulltext`, `service-error`, …) in execution order, so callers can see which stage failed and why
91
- - Section filtering by title (case-insensitive match, e.g. `["methods", "results"]`) and configurable max sections apply to PMC output
92
- - Character budgets keep context size predictable: `maxCharacters` caps body text per article (PMC sections and subsections, or the Unpaywall body), `maxCharactersPerSection` caps a single PMC section, and `overflowMode` picks between `truncate` (fill sections in document order) and `outline` (split the budget evenly so every heading survives with an excerpt). Budgets run after the semantic filters, and a `truncation` object reports per-article and per-section character counts whenever anything was shortened
91
+ - Section filtering by title (case-insensitive substring match at any nesting depth, e.g. `["methods", "results"]`) and configurable max sections apply to PMC output. A section that matches directly is returned whole; one kept only because a nested subsection matched keeps its heading as a breadcrumb with its own text cleared
92
+ - Tables are returned as structured cells (`tables[]` on each PMC article rows, caption, label, footnotes, and the enclosing section, named for back-matter and appendix tables as well as body ones), covering `<floats-group>`, `<back>` and appendix deposits alongside body tables. `colspan` and `rowspan` are expanded to one entry per grid column, so a value stays under the header it belongs to on both output surfaces; a cell spanning several columns or rows repeats across the cells it covers. A deposit with no readable markup comes back labelled with an `unextractableReason` rather than silently missing. Turn them off with `includeTables: false`
93
+ - Figures and supplementary material come back as structured entries (`assets[]` on each PMC article — `assetType`, label, caption, the enclosing section, and the `<graphic>`/`<media>` pointer exactly as deposited, which is a name inside the PMC deposit rather than a fetchable URL), covering `<floats-group>`, `<back>` and appendix placements alongside body ones. Each one lifted out of the body leaves a `[Figure: <label>]` / `[Supplementary: <label>]` marker at its position, so reading order survives the lift. Turn them off with `includeAssets: false`, which removes the markers with them. Prose-shaped blocks — lists, definition lists, block quotes, boxed text, preformatted blocks, displayed formulae — render into the section text at their document position instead, and no block is ever concatenated into a neighbouring sentence
94
+ - Character budgets keep context size predictable: `maxCharacters` caps body text per article (PMC sections and subsections, inline blocks included, plus table content — cell, caption, label and footnote text, not the Markdown grid rendered around it — and asset label, caption and pointer text; or the Unpaywall body), `maxCharactersPerSection` caps a single PMC section, and `overflowMode` picks between `truncate` (fill sections in document order) and `outline` (split the budget evenly so every heading survives with an excerpt). Sections are served first, then tables, then assets, each spending what is left in document order until one does not fit; that entry and the rest are dropped whole rather than cut mid-row or returned with a shortened caption, and named in `truncation.articles[].omittedTableNames` / `omittedAssetNames`. Budgets run after the semantic filters, and a `truncation` object reports per-article and per-section character counts whenever anything was shortened
93
95
  - `maxResponseCharacters` bounds the whole response instead of each body: every field of a returned record counts (abstract, references, metadata, body), one ledger across PMC-, Europe PMC-, and Unpaywall-served articles. Articles past the ceiling are deferred whole, with their ids — in the branch they were requested under — in `deferred.ids` for a follow-up call
94
96
  - Up to 10 articles per request
95
97
 
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * @fileoverview Text helpers shared by the tool definitions: the surrogate-safe
3
3
  * character cut used to bound returned text to a budget, and the render-time
4
- * Markdown escape applied to upstream strings interpolated into `format()`.
4
+ * Markdown escapes applied to upstream strings interpolated into `format()` —
5
+ * one for an inline position, one for a table cell.
5
6
  * @module src/mcp-server/tools/definitions/_text
6
7
  */
7
8
  /**
@@ -44,4 +45,25 @@ export declare function sliceCodeUnits(text: string, limit: number): string;
44
45
  * only at the start of a line, and the value never reaches one.
45
46
  */
46
47
  export declare function escapeMarkdownInline(text: string): string;
48
+ /**
49
+ * Escape an upstream string for a Markdown table cell — {@link
50
+ * escapeMarkdownInline} plus the cell delimiter.
51
+ *
52
+ * `|` needs escaping here and nowhere else. Inside a row it ends the cell, so an
53
+ * unescaped one in a value splits it and shifts every value after it one column
54
+ * left: a grid that renders cleanly while reporting the wrong numbers under the
55
+ * wrong headers. Outside a table it is an ordinary character, which is why the
56
+ * inline escape leaves it alone rather than spending a backslash on every value
57
+ * that happens to carry one.
58
+ *
59
+ * Line breaks are already collapsed to a space by the inline escape — a cell
60
+ * needs that too, since a newline inside one ends the row. (#111)
61
+ *
62
+ * Order is load-bearing. The inline escape runs first because it is what escapes
63
+ * the backslash; the backslashes added here for `|` are escape characters and
64
+ * must not be escaped in turn. Reversed, the `\` this step adds is doubled by
65
+ * the backslash pass that follows, which leaves the `|` bare and splits the cell
66
+ * anyway — the exact defect this function exists to prevent.
67
+ */
68
+ export declare function escapeMarkdownTableCell(text: string): string;
47
69
  //# sourceMappingURL=_text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_text.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlE;AA2CD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAazD"}
1
+ {"version":3,"file":"_text.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_text.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlE;AA2CD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAazD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D"}
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * @fileoverview Text helpers shared by the tool definitions: the surrogate-safe
3
3
  * character cut used to bound returned text to a budget, and the render-time
4
- * Markdown escape applied to upstream strings interpolated into `format()`.
4
+ * Markdown escapes applied to upstream strings interpolated into `format()` —
5
+ * one for an inline position, one for a table cell.
5
6
  * @module src/mcp-server/tools/definitions/_text
6
7
  */
7
8
  const HIGH_SURROGATE_FIRST = 0xd800;
@@ -105,4 +106,27 @@ export function escapeMarkdownInline(text) {
105
106
  return escaped;
106
107
  return escaped.replace(/_/g, (underscore, index) => pairable.has(index) ? `\\${underscore}` : underscore);
107
108
  }
109
+ /**
110
+ * Escape an upstream string for a Markdown table cell — {@link
111
+ * escapeMarkdownInline} plus the cell delimiter.
112
+ *
113
+ * `|` needs escaping here and nowhere else. Inside a row it ends the cell, so an
114
+ * unescaped one in a value splits it and shifts every value after it one column
115
+ * left: a grid that renders cleanly while reporting the wrong numbers under the
116
+ * wrong headers. Outside a table it is an ordinary character, which is why the
117
+ * inline escape leaves it alone rather than spending a backslash on every value
118
+ * that happens to carry one.
119
+ *
120
+ * Line breaks are already collapsed to a space by the inline escape — a cell
121
+ * needs that too, since a newline inside one ends the row. (#111)
122
+ *
123
+ * Order is load-bearing. The inline escape runs first because it is what escapes
124
+ * the backslash; the backslashes added here for `|` are escape characters and
125
+ * must not be escaped in turn. Reversed, the `\` this step adds is doubled by
126
+ * the backslash pass that follows, which leaves the `|` bare and splits the cell
127
+ * anyway — the exact defect this function exists to prevent.
128
+ */
129
+ export function escapeMarkdownTableCell(text) {
130
+ return escapeMarkdownInline(text).replace(/\|/g, '\\|');
131
+ }
108
132
  //# sourceMappingURL=_text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_text.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,oBAAoB,GAAG,MAAM,CAAC;AACpC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEnC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,KAAa;IACxD,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1B,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,IAAI,IAAI,oBAAoB,IAAI,IAAI,IAAI,mBAAmB,CAAC;IAC/E,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC;AAED,2EAA2E;AAC3E,MAAM,aAAa,GAAG,sBAAsB,CAAC;AAC7C;;;;;;GAMG;AACH,MAAM,kBAAkB,GAAG,0BAA0B,CAAC;AACtD,mFAAmF;AACnF,MAAM,YAAY,GAAG,aAAa,CAAC;AAEnC,SAAS,OAAO,CAAC,IAAY,EAAE,SAAiB;IAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,WAAW,CAAC,IAAY,EAAE,OAAe;IAChD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAA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z.ZodString>>;
36
36
  includeReferences: z.ZodDefault<z.ZodBoolean>;
37
+ includeTables: z.ZodDefault<z.ZodBoolean>;
38
+ includeAssets: z.ZodDefault<z.ZodBoolean>;
37
39
  maxSections: z.ZodOptional<z.ZodNumber>;
38
40
  sections: z.ZodOptional<z.ZodArray<z.ZodString>>;
39
41
  maxCharacters: z.ZodOptional<z.ZodNumber>;
@@ -87,6 +89,31 @@ export declare const fetchFulltextTool: import("@cyanheads/mcp-ts-core").ToolDef
87
89
  text: z.ZodString;
88
90
  }, z.core.$strip>>>;
89
91
  }, z.core.$strip>>;
92
+ tables: z.ZodOptional<z.ZodArray<z.ZodObject<{
93
+ label: z.ZodOptional<z.ZodString>;
94
+ caption: z.ZodOptional<z.ZodString>;
95
+ id: z.ZodOptional<z.ZodString>;
96
+ sectionTitle: z.ZodOptional<z.ZodString>;
97
+ headerRowCount: z.ZodNumber;
98
+ rows: z.ZodArray<z.ZodArray<z.ZodString>>;
99
+ footnotes: z.ZodOptional<z.ZodString>;
100
+ unextractableReason: z.ZodOptional<z.ZodEnum<{
101
+ "cals-tgroup": "cals-tgroup";
102
+ "graphic-only": "graphic-only";
103
+ "no-rows": "no-rows";
104
+ }>>;
105
+ }, z.core.$strip>>>;
106
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
107
+ assetType: z.ZodEnum<{
108
+ figure: "figure";
109
+ "supplementary-material": "supplementary-material";
110
+ }>;
111
+ label: z.ZodOptional<z.ZodString>;
112
+ caption: z.ZodOptional<z.ZodString>;
113
+ id: z.ZodOptional<z.ZodString>;
114
+ sectionTitle: z.ZodOptional<z.ZodString>;
115
+ href: z.ZodOptional<z.ZodString>;
116
+ }, z.core.$strip>>>;
90
117
  references: z.ZodOptional<z.ZodArray<z.ZodObject<{
91
118
  citation: z.ZodString;
92
119
  id: z.ZodOptional<z.ZodString>;
@@ -123,6 +150,7 @@ export declare const fetchFulltextTool: import("@cyanheads/mcp-ts-core").ToolDef
123
150
  pmid: "pmid";
124
151
  }>;
125
152
  reason: z.ZodEnum<{
153
+ "doi-lookup-failed": "doi-lookup-failed";
126
154
  "fetch-failed": "fetch-failed";
127
155
  "no-body": "no-body";
128
156
  "no-doi": "no-doi";
@@ -140,6 +168,7 @@ export declare const fetchFulltextTool: import("@cyanheads/mcp-ts-core").ToolDef
140
168
  unpaywall: "unpaywall";
141
169
  }>;
142
170
  outcome: z.ZodEnum<{
171
+ "doi-lookup-failed": "doi-lookup-failed";
143
172
  "fetch-failed": "fetch-failed";
144
173
  miss: "miss";
145
174
  "no-body": "no-body";
@@ -167,6 +196,8 @@ export declare const fetchFulltextTool: import("@cyanheads/mcp-ts-core").ToolDef
167
196
  originalCharacters: z.ZodNumber;
168
197
  returnedCharacters: z.ZodNumber;
169
198
  omittedSections: z.ZodNumber;
199
+ omittedTables: z.ZodOptional<z.ZodNumber>;
200
+ omittedAssets: z.ZodOptional<z.ZodNumber>;
170
201
  articles: z.ZodArray<z.ZodObject<{
171
202
  id: z.ZodString;
172
203
  source: z.ZodEnum<{
@@ -181,6 +212,10 @@ export declare const fetchFulltextTool: import("@cyanheads/mcp-ts-core").ToolDef
181
212
  returnedCharacters: z.ZodNumber;
182
213
  truncated: z.ZodBoolean;
183
214
  }, z.core.$strip>>>;
215
+ omittedTables: z.ZodOptional<z.ZodNumber>;
216
+ omittedTableNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
217
+ omittedAssets: z.ZodOptional<z.ZodNumber>;
218
+ omittedAssetNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
184
219
  }, z.core.$strip>>;
185
220
  }, z.core.$strip>>;
186
221
  deferred: z.ZodOptional<z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-fulltext.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/fetch-fulltext.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAg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