@cyanheads/pubchem-mcp-server 0.5.0 → 0.5.2

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 (35) hide show
  1. package/README.md +7 -4
  2. package/dist/mcp-server/resources/definitions/compound-xrefs.resource.js +1 -1
  3. package/dist/mcp-server/resources/definitions/compound-xrefs.resource.js.map +1 -1
  4. package/dist/mcp-server/tools/definitions/get-compound-details.tool.d.ts +11 -1
  5. package/dist/mcp-server/tools/definitions/get-compound-details.tool.d.ts.map +1 -1
  6. package/dist/mcp-server/tools/definitions/get-compound-details.tool.js +147 -21
  7. package/dist/mcp-server/tools/definitions/get-compound-details.tool.js.map +1 -1
  8. package/dist/mcp-server/tools/definitions/get-compound-interactions.tool.d.ts +14 -0
  9. package/dist/mcp-server/tools/definitions/get-compound-interactions.tool.d.ts.map +1 -1
  10. package/dist/mcp-server/tools/definitions/get-compound-interactions.tool.js +101 -12
  11. package/dist/mcp-server/tools/definitions/get-compound-interactions.tool.js.map +1 -1
  12. package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.d.ts +3 -0
  13. package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.d.ts.map +1 -1
  14. package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.js +60 -16
  15. package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/index.d.ts +34 -1
  17. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  18. package/dist/mcp-server/tools/definitions/search-assays.tool.d.ts +3 -0
  19. package/dist/mcp-server/tools/definitions/search-assays.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/search-assays.tool.js +41 -16
  21. package/dist/mcp-server/tools/definitions/search-assays.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/search-compounds.tool.d.ts +3 -0
  23. package/dist/mcp-server/tools/definitions/search-compounds.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/search-compounds.tool.js +65 -33
  25. package/dist/mcp-server/tools/definitions/search-compounds.tool.js.map +1 -1
  26. package/dist/services/pubchem/pubchem-client.d.ts +29 -8
  27. package/dist/services/pubchem/pubchem-client.d.ts.map +1 -1
  28. package/dist/services/pubchem/pubchem-client.js +102 -37
  29. package/dist/services/pubchem/pubchem-client.js.map +1 -1
  30. package/dist/services/pubchem/types.d.ts +51 -0
  31. package/dist/services/pubchem/types.d.ts.map +1 -1
  32. package/dist/services/pubchem/types.js.map +1 -1
  33. package/manifest.json +1 -1
  34. package/package.json +1 -1
  35. package/server.json +3 -3
@@ -7,7 +7,7 @@ import { getPubChemClient } from '../../../services/pubchem/pubchem-client.js';
7
7
  import { inlineData, quoteData } from './untrusted-text.js';
8
8
  export const getCompoundInteractions = tool('pubchem_get_compound_interactions', {
9
9
  title: 'Get Compound Interactions',
10
- description: "Get a compound's interaction data: drug-drug interactions (DrugBank), drug-food interactions, and chemical-target interactions (binding/activity from BindingDB, ChEMBL, and others). Each entry carries its originating source. Richest for approved drugs; many compounds have no deposited interaction records.",
10
+ description: "Get a compound's interaction data: drug-drug interactions (DrugBank), drug-food interactions, and chemical-target interactions (binding/activity from BindingDB, ChEMBL, and others). Each entry carries its originating source. Results are paged per kind, with the source-record total and the next offset reported for each. Richest for approved drugs; many compounds have no deposited interaction records.",
11
11
  annotations: {
12
12
  readOnlyHint: true,
13
13
  idempotentHint: true,
@@ -24,13 +24,23 @@ export const getCompoundInteractions = tool('pubchem_get_compound_interactions',
24
24
  .min(1)
25
25
  .default(['drug-drug'])
26
26
  .describe('Interaction kinds to fetch. "drug-drug" (interactions with other drugs), "drug-food" (dietary interactions), "target" (binding/activity against molecular targets). Default: ["drug-drug"].'),
27
+ offset: z
28
+ .number()
29
+ .int()
30
+ .min(0)
31
+ // PubChem's record cursor is a signed 32-bit integer; a larger start makes the upstream
32
+ // query fail outright, which would surface as a retryable kind failure that no retry can
33
+ // clear. Rejecting it here names the bound instead.
34
+ .max(2147483646)
35
+ .default(0)
36
+ .describe("Zero-based start position within each requested kind, counted in source records rather than returned entries. The same offset applies to every kind in the call, and the kinds advance at different rates — when paging past the first page, request one kind per call and pass that kind's nextOffset. Default: 0."),
27
37
  maxEntries: z
28
38
  .number()
29
39
  .int()
30
40
  .min(1)
31
41
  .max(50)
32
42
  .default(10)
33
- .describe('Max entries per kind (1-50). Well-studied drugs have a long tail of interactions. Default: 10.'),
43
+ .describe('Max entries per kind per page (1-50). Well-studied drugs have a long tail of interactions; use offset to reach the ones past this page. Default: 10.'),
34
44
  }),
35
45
  output: z.object({
36
46
  cid: z.number().describe('PubChem Compound ID.'),
@@ -47,12 +57,38 @@ export const getCompoundInteractions = tool('pubchem_get_compound_interactions',
47
57
  })
48
58
  .describe('A single interaction entry.'))
49
59
  .describe('Interaction entries across the requested kinds.'),
60
+ paging: z
61
+ .array(z
62
+ .object({
63
+ kind: z
64
+ .enum(['drug-drug', 'drug-food', 'target'])
65
+ .describe('Interaction category this page covers.'),
66
+ returnedCount: z.number().describe('Interaction entries returned for this kind.'),
67
+ totalRecords: z
68
+ .number()
69
+ .describe('Source records available for this kind, across all pages. Entries are derived from these records and can be fewer: a "target" record naming no molecular target and a "drug-drug" record carrying no statement both yield nothing, and duplicate measurements collapse within a page. Pages divide the records, not the entries, so a duplicate split across two pages is reported on both.'),
70
+ nextOffset: z
71
+ .number()
72
+ .optional()
73
+ .describe('Offset to pass on the next call to continue this kind past the current page. Omitted when no records remain.'),
74
+ truncated: z
75
+ .boolean()
76
+ .describe('True when source records remain for this kind past the current page.'),
77
+ })
78
+ .describe('Page position for one interaction kind.'))
79
+ .describe('Per-kind page position, one entry per requested kind that was retrieved. A kind listed in failedKinds is absent — its position is unknown, not exhausted.'),
50
80
  }),
51
- // Agent-facing context — kind echo, total returned, failed kinds, and an empty-result notice.
52
- // Reaches structuredContent and content[]; keys disjoint from output (cid/entries).
81
+ // Agent-facing context — kind echo, total returned, the page boundary, failed kinds, and
82
+ // an empty-result notice. Reaches structuredContent and content[]; keys disjoint from
83
+ // output (cid/entries/paging).
53
84
  enrichment: {
54
85
  requestedKinds: z.string().describe('Interaction kinds requested (comma-separated).'),
55
86
  returnedCount: z.number().describe('Total interaction entries returned across all kinds.'),
87
+ offset: z.number().describe('Zero-based start position read within each requested kind.'),
88
+ nextOffset: z
89
+ .number()
90
+ .optional()
91
+ .describe('Offset to pass on the next call, reported when exactly one requested kind has records remaining. Omitted when none do, and when several do — those advance to different positions, so read paging[].nextOffset instead.'),
56
92
  failedKinds: z
57
93
  .string()
58
94
  .optional()
@@ -60,11 +96,11 @@ export const getCompoundInteractions = tool('pubchem_get_compound_interactions',
60
96
  notice: z
61
97
  .string()
62
98
  .optional()
63
- .describe('Guidance when no interaction data was found for the requested kinds.'),
99
+ .describe('Guidance when a kind failed, when no interaction data was found, when the offset runs past every requested kind, or when further pages remain. Absent when this page is complete and every kind resolved.'),
64
100
  },
65
101
  async handler(input, ctx) {
66
102
  const client = getPubChemClient();
67
- const { entries, failedKinds } = await client.getInteractions(input.cid, input.kinds, input.maxEntries);
103
+ const { entries, pages, failedKinds } = await client.getInteractions(input.cid, input.kinds, input.maxEntries, input.offset);
68
104
  for (const f of failedKinds) {
69
105
  ctx.log.warning('Interaction kind failed', {
70
106
  cid: input.cid,
@@ -75,25 +111,78 @@ export const getCompoundInteractions = tool('pubchem_get_compound_interactions',
75
111
  ctx.log.info('Interactions fetched', {
76
112
  cid: input.cid,
77
113
  kinds: input.kinds,
114
+ offset: input.offset,
78
115
  returned: entries.length,
79
116
  failed: failedKinds.length,
80
117
  });
81
- ctx.enrich({ requestedKinds: input.kinds.join(', '), returnedCount: entries.length });
118
+ // Each kind advances by the records it actually read, never by maxEntries — a kind that
119
+ // stopped early (or whose window ran short) would otherwise emit a next offset that skips
120
+ // records, and a cap-derived stride can also land off an integer boundary.
121
+ const paging = pages.map((p) => {
122
+ const next = input.offset + p.recordsConsumed;
123
+ const truncated = next < p.totalRecords;
124
+ return {
125
+ kind: p.kind,
126
+ returnedCount: p.returnedCount,
127
+ totalRecords: p.totalRecords,
128
+ truncated,
129
+ ...(truncated ? { nextOffset: next } : {}),
130
+ };
131
+ });
132
+ ctx.enrich({
133
+ requestedKinds: input.kinds.join(', '),
134
+ returnedCount: entries.length,
135
+ offset: input.offset,
136
+ });
137
+ const remaining = paging.filter((p) => p.truncated);
138
+ // A single scalar nextOffset only means something when one kind is still going; with two
139
+ // it would have to pick one and silently skip the other's records.
140
+ const soleNextOffset = remaining.length === 1 ? remaining[0]?.nextOffset : undefined;
141
+ if (soleNextOffset !== undefined)
142
+ ctx.enrich({ nextOffset: soleNextOffset });
143
+ // Notice is last-wins, so every applicable signal composes into one string.
144
+ const noticeParts = [];
82
145
  if (failedKinds.length > 0) {
83
146
  const names = failedKinds.map((f) => f.kind).join(', ');
84
147
  const plural = failedKinds.length > 1;
85
148
  ctx.enrich({ failedKinds: names });
86
- ctx.enrich.notice(`Could not retrieve ${names} interaction${plural ? 's' : ''} for CID ${input.cid}.${entries.length > 0 ? ' Returned the kinds that succeeded.' : ''} Retry to re-attempt ${plural ? 'them' : 'it'}.`);
149
+ noticeParts.push(`Could not retrieve ${names} interaction${plural ? 's' : ''} for CID ${input.cid}.${entries.length > 0 ? ' Returned the kinds that succeeded.' : ''} Retry to re-attempt ${plural ? 'them' : 'it'}.`);
150
+ }
151
+ const largestTotal = paging.reduce((max, p) => Math.max(max, p.totalRecords), 0);
152
+ if (entries.length === 0 && paging.length > 0) {
153
+ if (largestTotal === 0) {
154
+ noticeParts.push(`No ${paging.map((p) => p.kind).join('/')} interaction data found for CID ${input.cid}. PubChem has no deposited interaction records for this compound — coverage is richest for approved drugs.`);
155
+ }
156
+ else if (input.offset >= largestTotal) {
157
+ noticeParts.push(`offset ${input.offset} is past every requested kind — the largest has ${largestTotal} record(s). Pass an offset below ${largestTotal}.`);
158
+ }
159
+ else {
160
+ noticeParts.push(`CID ${input.cid} has ${largestTotal} record(s) for the requested kind(s), but none read on this page carried a reportable interaction.`);
161
+ }
87
162
  }
88
- else if (entries.length === 0) {
89
- ctx.enrich.notice(`No ${input.kinds.join('/')} interaction data found for CID ${input.cid}. PubChem has no deposited interaction records for this compound — coverage is richest for approved drugs.`);
163
+ if (remaining.length > 0) {
164
+ noticeParts.push(`More records remain ${remaining
165
+ .map((p) => `${p.kind}: pass offset=${p.nextOffset} of ${p.totalRecords} total`)
166
+ .join('; ')}.`);
90
167
  }
91
- return { cid: input.cid, entries };
168
+ if (noticeParts.length > 0)
169
+ ctx.enrich.notice(noticeParts.join(' '));
170
+ return { cid: input.cid, entries, paging };
92
171
  },
93
172
  format(result) {
94
173
  const lines = [`## Interactions — CID ${result.cid}`, ''];
174
+ for (const p of result.paging) {
175
+ const summary = `${p.returnedCount} entr${p.returnedCount === 1 ? 'y' : 'ies'} from ${p.totalRecords} source record(s)`;
176
+ lines.push(`- **${p.kind}** — ${summary}${p.truncated ? ' — truncated' : ''}`);
177
+ if (p.nextOffset !== undefined)
178
+ lines.push(` Next offset: ${p.nextOffset}`);
179
+ }
180
+ if (result.paging.length > 0)
181
+ lines.push('');
95
182
  if (result.entries.length === 0) {
96
- lines.push('No interaction data found.');
183
+ // Neutral wording: an empty page is "no data", "offset past the end", or "the records
184
+ // read named no interaction" — the enrichment trailer's notice says which.
185
+ lines.push('No interaction entries returned.');
97
186
  return [{ type: 'text', text: lines.join('\n') }];
98
187
  }
99
188
  for (const e of result.entries) {
@@ -1 +1 @@
1
- {"version":3,"file":"get-compound-interactions.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-interactions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,uBAAuB,GAA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AM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;YACzC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC/B,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,OAAO,cAAc,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC1E,oEAAoE;YACpE,oEAAoE;YACpE,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACtE,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":"get-compound-interactions.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-interactions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,uBAAuB,GAA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AC;QAE7C,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,sFAAsF;YACtF,2EAA2E;YAC3E,KAAK,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;YAC/C,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC/B,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,OAAO,cAAc,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC1E,oEAAoE;YACpE,oEAAoE;YACpE,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACtE,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"}
@@ -8,6 +8,7 @@ export declare const getCompoundXrefs: import("@cyanheads/mcp-ts-core").ToolDefi
8
8
  xrefTypes: z.ZodArray<z.ZodEnum<{
9
9
  [x: string]: string;
10
10
  }>>;
11
+ offset: z.ZodDefault<z.ZodNumber>;
11
12
  maxPerType: z.ZodDefault<z.ZodNumber>;
12
13
  }, z.core.$strip>, z.ZodObject<{
13
14
  cid: z.ZodNumber;
@@ -18,6 +19,8 @@ export declare const getCompoundXrefs: import("@cyanheads/mcp-ts-core").ToolDefi
18
19
  truncated: z.ZodBoolean;
19
20
  }, z.core.$strip>>;
20
21
  }, z.core.$strip>, undefined, {
22
+ readonly offset: z.ZodNumber;
23
+ readonly nextOffset: z.ZodOptional<z.ZodNumber>;
21
24
  readonly notice: z.ZodOptional<z.ZodString>;
22
25
  }>;
23
26
  //# sourceMappingURL=get-compound-xrefs.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-compound-xrefs.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-xrefs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;EAsI3B,CAAC"}
1
+ {"version":3,"file":"get-compound-xrefs.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-xrefs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;EAwL3B,CAAC"}
@@ -8,7 +8,7 @@ import { XREF_TYPES } from '../../../services/pubchem/types.js';
8
8
  const xrefTypeEnum = z.enum(XREF_TYPES);
9
9
  export const getCompoundXrefs = tool('pubchem_get_compound_xrefs', {
10
10
  title: 'Get Compound Cross-References',
11
- description: 'Get external database cross-references for a compound: PubMed citations, patent IDs, gene/protein associations, registry numbers, and taxonomy IDs. Results are capped per type with total counts reported.',
11
+ description: 'Get external database cross-references for a compound: PubMed citations, patent IDs, gene/protein associations, registry numbers, and taxonomy IDs. Results are paged per type — capped at maxPerType with the total count reported; reach the IDs past a page with offset.',
12
12
  annotations: {
13
13
  readOnlyHint: true,
14
14
  idempotentHint: true,
@@ -24,12 +24,18 @@ export const getCompoundXrefs = tool('pubchem_get_compound_xrefs', {
24
24
  .array(xrefTypeEnum)
25
25
  .min(1)
26
26
  .describe('Cross-reference types to retrieve. String IDs: RegistryID (DSSTox/EPA registry numbers), RN (CAS numbers), PatentID. Numeric IDs: PubMedID, GeneID (NCBI Gene), ProteinGI (legacy NCBI Protein GI), TaxonomyID.'),
27
+ offset: z
28
+ .number()
29
+ .int()
30
+ .min(0)
31
+ .default(0)
32
+ .describe('Zero-based index of the first ID to return within each xref type. The same offset is applied to every requested type. Pass the nextOffset from a previous call to read the following page. Default: 0.'),
27
33
  maxPerType: z
28
34
  .number()
29
35
  .min(1)
30
36
  .max(500)
31
37
  .default(50)
32
- .describe('Max IDs to return per xref type (1-500). A compound may have thousands of PubMed references. Total count always reported. Default: 50.'),
38
+ .describe('Max IDs to return per xref type per page (1-500). A compound may have thousands of PubMed references; use offset to reach the ones past this page. Total count always reported. Default: 50.'),
33
39
  }),
34
40
  output: z.object({
35
41
  cid: z.number().describe('PubChem Compound ID.'),
@@ -48,21 +54,31 @@ export const getCompoundXrefs = tool('pubchem_get_compound_xrefs', {
48
54
  z.number().describe('Numeric cross-reference ID (e.g. PubMed ID, Gene ID).'),
49
55
  ])
50
56
  .describe('Cross-reference identifier — string or number depending on type.'))
51
- .describe('Cross-reference IDs (capped by maxPerType).'),
52
- totalAvailable: z.number().describe('Total IDs available before truncation.'),
53
- truncated: z.boolean().describe('Whether results were truncated.'),
57
+ .describe('Cross-reference IDs on this page (window of offset + maxPerType).'),
58
+ totalAvailable: z
59
+ .number()
60
+ .describe('Total IDs available for this type, across all pages.'),
61
+ truncated: z
62
+ .boolean()
63
+ .describe('True when IDs for this type remain past the current page.'),
54
64
  })
55
65
  .describe('Cross-reference group for one type.'))
56
66
  .describe('Cross-references grouped by type.'),
57
67
  }),
58
- // Agent-facing context — an empty-result notice distinguishing a nonexistent CID from a
59
- // real compound that simply has none of the requested xref types. Reaches structuredContent
60
- // and content[]; keys disjoint from output (cid/xrefs live there).
68
+ // Agent-facing context — the page boundary shared by every requested type, plus a notice
69
+ // distinguishing a nonexistent CID from a real compound that simply has none of the
70
+ // requested xref types. Reaches structuredContent and content[]; keys disjoint from output
71
+ // (cid/xrefs live there).
61
72
  enrichment: {
73
+ offset: z.number().describe('Zero-based index of the first ID returned within each type.'),
74
+ nextOffset: z
75
+ .number()
76
+ .optional()
77
+ .describe('Offset to pass on the next call to continue past this page. Omitted when no requested type has further IDs.'),
62
78
  notice: z
63
79
  .string()
64
80
  .optional()
65
- .describe('Recovery guidance when every requested xref type returned zero IDs hints to verify the CID. Absent when any cross-references were found.'),
81
+ .describe('Recovery guidance when every requested xref type returned zero IDs, when the offset runs past every type, or when further pages remain. Absent when this page is complete and non-empty.'),
66
82
  },
67
83
  async handler(input, ctx) {
68
84
  const client = getPubChemClient();
@@ -71,32 +87,60 @@ export const getCompoundXrefs = tool('pubchem_get_compound_xrefs', {
71
87
  for (const xrefType of input.xrefTypes) {
72
88
  const allIds = await client.getXrefs(input.cid, xrefType);
73
89
  const totalAvailable = allIds.length;
74
- const ids = allIds.slice(0, input.maxPerType);
90
+ // Offset is applied client-side: PubChem's xref endpoint returns the whole list for a
91
+ // type in one response, so getXrefs already holds every ID.
92
+ const ids = allIds.slice(input.offset, input.offset + input.maxPerType);
75
93
  xrefs.push({
76
94
  type: xrefType,
77
95
  ids,
78
96
  totalAvailable,
79
- truncated: totalAvailable > input.maxPerType,
97
+ truncated: input.offset + ids.length < totalAvailable,
80
98
  });
81
99
  }
82
100
  ctx.log.info('Xrefs fetched', {
83
101
  cid: input.cid,
84
102
  types: input.xrefTypes,
103
+ offset: input.offset,
85
104
  totalIds: xrefs.reduce((sum, x) => sum + x.ids.length, 0),
86
105
  });
106
+ // Any type whose page is full has more behind it, and every full page is the same length —
107
+ // so a single nextOffset covers every type that still has IDs left. The stride comes from a
108
+ // returned page rather than maxPerType, which accepts a fractional value that would make
109
+ // nextOffset non-integer and so rejected by this tool's own offset input.
110
+ const remainingTypes = xrefs.filter((x) => x.truncated);
111
+ const hasMore = remainingTypes.length > 0;
112
+ const nextOffset = input.offset + (remainingTypes[0]?.ids.length ?? 0);
113
+ const largestTotal = Math.max(...xrefs.map((x) => x.totalAvailable));
114
+ ctx.enrich({ offset: input.offset });
115
+ if (hasMore)
116
+ ctx.enrich({ nextOffset });
87
117
  // Empty-result signal (#30): every requested type came back empty — either the CID
88
118
  // doesn't exist or it genuinely has none of these xref types. Point at CID verification.
89
- if (xrefs.every((x) => x.totalAvailable === 0)) {
119
+ if (largestTotal === 0) {
90
120
  ctx.enrich.notice(`No cross-references found for CID ${input.cid} across the requested type(s): ${input.xrefTypes.join(', ')}. The compound may have none of these xref types, or verify the CID with pubchem_search_compounds.`);
91
121
  }
122
+ else if (xrefs.every((x) => x.ids.length === 0)) {
123
+ ctx.enrich.notice(`offset ${input.offset} is past every requested type — the largest has ${largestTotal} ID(s). Pass an offset below ${largestTotal}.`);
124
+ }
125
+ else if (hasMore) {
126
+ const remaining = remainingTypes
127
+ .map((x) => `${x.type} (${x.totalAvailable} total)`)
128
+ .join(', ');
129
+ ctx.enrich.notice(`More IDs remain for: ${remaining}. Pass offset=${nextOffset} for the next page.`);
130
+ }
92
131
  return { cid: input.cid, xrefs };
93
132
  },
94
133
  format(result) {
95
134
  const lines = [`Cross-references for CID ${result.cid}`, ''];
96
135
  for (const xref of result.xrefs) {
97
- const countInfo = xref.truncated
98
- ? `${xref.ids.length} of ${xref.totalAvailable} total truncated`
99
- : `${xref.totalAvailable} total`;
136
+ // A page shorter than the total is disclosed as a window; "truncated" additionally
137
+ // marks that IDs remain *after* it (an offset can also leave IDs before it).
138
+ let countInfo = `${xref.totalAvailable} total`;
139
+ if (xref.ids.length !== xref.totalAvailable) {
140
+ countInfo = `${xref.ids.length} of ${xref.totalAvailable} total`;
141
+ if (xref.truncated)
142
+ countInfo += ' — truncated';
143
+ }
100
144
  lines.push(`**${xref.type}** (${countInfo})`);
101
145
  if (xref.ids.length > 0) {
102
146
  // Rendered in full: the handler already capped ids at maxPerType and the header
@@ -104,7 +148,7 @@ export const getCompoundXrefs = tool('pubchem_get_compound_xrefs', {
104
148
  lines.push(` ${xref.ids.join(', ')}`);
105
149
  }
106
150
  else {
107
- lines.push(' None found');
151
+ lines.push(xref.totalAvailable > 0 ? ' None on this page' : ' None found');
108
152
  }
109
153
  lines.push('');
110
154
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-compound-xrefs.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-xrefs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,UAA8C,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IACjE,KAAK,EAAE,+BAA+B;IACtC,WAAW,EACT,6MAA6M;IAC/M,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;KACpB;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,GAAG,EAAE,CAAC;aACH,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,EAAE;aACV,QAAQ,CAAC,8EAA8E,CAAC;QAC3F,SAAS,EAAE,CAAC;aACT,KAAK,CAAC,YAAY,CAAC;aACnB,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,iNAAiN,CAClN;QACH,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,wIAAwI,CACzI;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,M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I,CAAC,cAAc,oBAAoB;gBAClE,CAAC,CAAC,GAAG,IAAI,CAAC,cAAc,QAAQ,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,OAAO,SAAS,GAAG,CAAC,CAAC;YAE9C,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACxB,gFAAgF;gBAChF,wFAAwF;gBACxF,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAC7B,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,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":"get-compound-xrefs.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-xrefs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,UAA8C,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IACjE,KAAK,EAAE,+BAA+B;IACtC,WAAW,EACT,6QAA6Q;IAC/Q,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;KACpB;IACD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,wFAAwF;gBACxF,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;YAC/E,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,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"}
@@ -8,8 +8,10 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
8
8
  [x: string]: string;
9
9
  }>>>;
10
10
  includeDescription: import("zod").ZodDefault<import("zod").ZodBoolean>;
11
+ descriptionOffset: import("zod").ZodDefault<import("zod").ZodNumber>;
11
12
  maxDescriptions: import("zod").ZodDefault<import("zod").ZodNumber>;
12
13
  includeSynonyms: import("zod").ZodDefault<import("zod").ZodBoolean>;
14
+ synonymOffset: import("zod").ZodDefault<import("zod").ZodNumber>;
13
15
  maxSynonyms: import("zod").ZodDefault<import("zod").ZodNumber>;
14
16
  includeDrugLikeness: import("zod").ZodDefault<import("zod").ZodBoolean>;
15
17
  includeClassification: import("zod").ZodDefault<import("zod").ZodBoolean>;
@@ -74,11 +76,20 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
74
76
  meshClasses: import("zod").ZodArray<import("zod").ZodString>;
75
77
  }, import("zod/v4/core").$strip>>;
76
78
  }, import("zod/v4/core").$strip>>;
77
- }, import("zod/v4/core").$strip>, undefined, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
79
+ }, import("zod/v4/core").$strip>, undefined, {
80
+ readonly enrichedCids: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
81
+ readonly skippedCids: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
82
+ readonly synonymOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
83
+ readonly nextSynonymOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
84
+ readonly descriptionOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
85
+ readonly nextDescriptionOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
86
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
87
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
78
88
  cid: import("zod").ZodNumber;
79
89
  xrefTypes: import("zod").ZodArray<import("zod").ZodEnum<{
80
90
  [x: string]: string;
81
91
  }>>;
92
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
82
93
  maxPerType: import("zod").ZodDefault<import("zod").ZodNumber>;
83
94
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
84
95
  cid: import("zod").ZodNumber;
@@ -89,6 +100,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
89
100
  truncated: import("zod").ZodBoolean;
90
101
  }, import("zod/v4/core").$strip>>;
91
102
  }, import("zod/v4/core").$strip>, undefined, {
103
+ readonly offset: import("zod").ZodNumber;
104
+ readonly nextOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
92
105
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
93
106
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
94
107
  searchType: import("zod").ZodEnum<{
@@ -112,6 +125,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
112
125
  smiles: "smiles";
113
126
  }>>;
114
127
  threshold: import("zod").ZodDefault<import("zod").ZodNumber>;
128
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
115
129
  maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
116
130
  properties: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
117
131
  [x: string]: string;
@@ -147,6 +161,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
147
161
  readonly searchType: import("zod").ZodString;
148
162
  readonly totalFound: import("zod").ZodOptional<import("zod").ZodNumber>;
149
163
  readonly totalFoundAtLeast: import("zod").ZodOptional<import("zod").ZodNumber>;
164
+ readonly offset: import("zod").ZodNumber;
165
+ readonly nextOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
150
166
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
151
167
  readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
152
168
  readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
@@ -285,6 +301,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
285
301
  "drug-food": "drug-food";
286
302
  target: "target";
287
303
  }>>>;
304
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
288
305
  maxEntries: import("zod").ZodDefault<import("zod").ZodNumber>;
289
306
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
290
307
  cid: import("zod").ZodNumber;
@@ -298,9 +315,22 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
298
315
  source: import("zod").ZodString;
299
316
  text: import("zod").ZodString;
300
317
  }, import("zod/v4/core").$strip>>;
318
+ paging: import("zod").ZodArray<import("zod").ZodObject<{
319
+ kind: import("zod").ZodEnum<{
320
+ "drug-drug": "drug-drug";
321
+ "drug-food": "drug-food";
322
+ target: "target";
323
+ }>;
324
+ returnedCount: import("zod").ZodNumber;
325
+ totalRecords: import("zod").ZodNumber;
326
+ nextOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
327
+ truncated: import("zod").ZodBoolean;
328
+ }, import("zod/v4/core").$strip>>;
301
329
  }, import("zod/v4/core").$strip>, undefined, {
302
330
  readonly requestedKinds: import("zod").ZodString;
303
331
  readonly returnedCount: import("zod").ZodNumber;
332
+ readonly offset: import("zod").ZodNumber;
333
+ readonly nextOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
304
334
  readonly failedKinds: import("zod").ZodOptional<import("zod").ZodString>;
305
335
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
306
336
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
@@ -311,6 +341,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
311
341
  proteinname: "proteinname";
312
342
  }>;
313
343
  targetQuery: import("zod").ZodString;
344
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
314
345
  maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
315
346
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
316
347
  aids: import("zod").ZodArray<import("zod").ZodNumber>;
@@ -328,6 +359,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
328
359
  readonly targetType: import("zod").ZodString;
329
360
  readonly targetQuery: import("zod").ZodString;
330
361
  readonly totalFound: import("zod").ZodNumber;
362
+ readonly offset: import("zod").ZodNumber;
363
+ readonly nextOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
331
364
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
332
365
  readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
333
366
  readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW9B,CAAC"}
@@ -13,6 +13,7 @@ export declare const searchAssays: import("@cyanheads/mcp-ts-core").ToolDefiniti
13
13
  proteinname: "proteinname";
14
14
  }>;
15
15
  targetQuery: z.ZodString;
16
+ offset: z.ZodDefault<z.ZodNumber>;
16
17
  maxResults: z.ZodDefault<z.ZodNumber>;
17
18
  }, z.core.$strip>, z.ZodObject<{
18
19
  aids: z.ZodArray<z.ZodNumber>;
@@ -30,6 +31,8 @@ export declare const searchAssays: import("@cyanheads/mcp-ts-core").ToolDefiniti
30
31
  readonly targetType: z.ZodString;
31
32
  readonly targetQuery: z.ZodString;
32
33
  readonly totalFound: z.ZodNumber;
34
+ readonly offset: z.ZodNumber;
35
+ readonly nextOffset: z.ZodOptional<z.ZodNumber>;
33
36
  readonly truncated: z.ZodOptional<z.ZodBoolean>;
34
37
  readonly shown: z.ZodOptional<z.ZodNumber>;
35
38
  readonly cap: z.ZodOptional<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"search-assays.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-assays.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2HvB,CAAC"}
1
+ {"version":3,"file":"search-assays.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-assays.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwJvB,CAAC"}