@cyanheads/pubchem-mcp-server 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/README.md +198 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-bioactivity.tool.d.ts +33 -0
- package/dist/mcp-server/tools/definitions/get-bioactivity.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-bioactivity.tool.js +115 -0
- package/dist/mcp-server/tools/definitions/get-bioactivity.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-compound-details.tool.d.ts +22 -0
- package/dist/mcp-server/tools/definitions/get-compound-details.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-compound-details.tool.js +190 -0
- package/dist/mcp-server/tools/definitions/get-compound-details.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-compound-image.tool.d.ts +19 -0
- package/dist/mcp-server/tools/definitions/get-compound-image.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-compound-image.tool.js +57 -0
- package/dist/mcp-server/tools/definitions/get-compound-image.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-compound-safety.tool.d.ts +25 -0
- package/dist/mcp-server/tools/definitions/get-compound-safety.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-compound-safety.tool.js +94 -0
- package/dist/mcp-server/tools/definitions/get-compound-safety.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.d.ts +21 -0
- package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.js +90 -0
- package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-summary.tool.d.ts +23 -0
- package/dist/mcp-server/tools/definitions/get-summary.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-summary.tool.js +143 -0
- package/dist/mcp-server/tools/definitions/get-summary.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/index.d.ts +152 -0
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/index.js +23 -0
- package/dist/mcp-server/tools/definitions/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-assays.tool.d.ts +22 -0
- package/dist/mcp-server/tools/definitions/search-assays.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-assays.tool.js +76 -0
- package/dist/mcp-server/tools/definitions/search-assays.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-compounds.tool.d.ts +42 -0
- package/dist/mcp-server/tools/definitions/search-compounds.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-compounds.tool.js +204 -0
- package/dist/mcp-server/tools/definitions/search-compounds.tool.js.map +1 -0
- package/dist/services/pubchem/pubchem-client.d.ts +37 -0
- package/dist/services/pubchem/pubchem-client.d.ts.map +1 -0
- package/dist/services/pubchem/pubchem-client.js +546 -0
- package/dist/services/pubchem/pubchem-client.js.map +1 -0
- package/dist/services/pubchem/types.d.ts +133 -0
- package/dist/services/pubchem/types.d.ts.map +1 -0
- package/dist/services/pubchem/types.js +68 -0
- package/dist/services/pubchem/types.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Get descriptive summaries for PubChem entities: assays, genes,
|
|
3
|
+
* proteins, pathways, taxonomy, cell lines, or substances.
|
|
4
|
+
* @module mcp-server/tools/definitions/get-summary
|
|
5
|
+
*/
|
|
6
|
+
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
import { getPubChemClient } from '../../../services/pubchem/pubchem-client.js';
|
|
8
|
+
const entityTypeEnum = z.enum(['assay', 'gene', 'protein', 'taxonomy']);
|
|
9
|
+
export const getSummary = tool('pubchem_get_summary', {
|
|
10
|
+
title: 'Get Entity Summary',
|
|
11
|
+
description: 'Get descriptive summaries for PubChem entities by ID. Supports assays (AID), genes (Gene ID), ' +
|
|
12
|
+
'proteins (UniProt accession), and taxonomy (Tax ID). Up to 10 per call.',
|
|
13
|
+
annotations: {
|
|
14
|
+
readOnlyHint: true,
|
|
15
|
+
destructiveHint: false,
|
|
16
|
+
idempotentHint: true,
|
|
17
|
+
openWorldHint: true,
|
|
18
|
+
},
|
|
19
|
+
input: z.object({
|
|
20
|
+
entityType: entityTypeEnum.describe('Entity type. Determines ID format and returned fields.'),
|
|
21
|
+
identifiers: z
|
|
22
|
+
.array(z.union([z.string(), z.number()]))
|
|
23
|
+
.min(1)
|
|
24
|
+
.max(10)
|
|
25
|
+
.describe('Entity identifiers (1-10). Type depends on entityType:\n' +
|
|
26
|
+
'- assay: AID (number), e.g. [1000]\n' +
|
|
27
|
+
'- gene: Gene ID (number), e.g. [1956]\n' +
|
|
28
|
+
'- protein: UniProt accession (string), e.g. ["P00533"]\n' +
|
|
29
|
+
'- taxonomy: Tax ID (number), e.g. [9606]'),
|
|
30
|
+
}),
|
|
31
|
+
output: z.object({
|
|
32
|
+
entityType: z.string().describe('Entity type queried.'),
|
|
33
|
+
summaries: z
|
|
34
|
+
.array(z.object({
|
|
35
|
+
identifier: z.union([z.string(), z.number()]).describe('Queried identifier.'),
|
|
36
|
+
found: z.boolean().describe('Whether the entity was found.'),
|
|
37
|
+
data: z
|
|
38
|
+
.record(z.string(), z.unknown())
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('Entity summary data (shape varies by type).'),
|
|
41
|
+
}))
|
|
42
|
+
.describe('Summary results.'),
|
|
43
|
+
}),
|
|
44
|
+
async handler(input, ctx) {
|
|
45
|
+
const client = getPubChemClient();
|
|
46
|
+
const summaries = await Promise.all(input.identifiers.map(async (id) => {
|
|
47
|
+
const raw = await client.getEntitySummary(input.entityType, id);
|
|
48
|
+
if (!raw)
|
|
49
|
+
return { identifier: id, found: false };
|
|
50
|
+
const data = extractSummary(input.entityType, raw);
|
|
51
|
+
return { identifier: id, found: true, data };
|
|
52
|
+
}));
|
|
53
|
+
ctx.log.info('Summaries fetched', {
|
|
54
|
+
entityType: input.entityType,
|
|
55
|
+
requested: input.identifiers.length,
|
|
56
|
+
found: summaries.filter((s) => s.found).length,
|
|
57
|
+
});
|
|
58
|
+
return { entityType: input.entityType, summaries };
|
|
59
|
+
},
|
|
60
|
+
format(result) {
|
|
61
|
+
const lines = [`## ${capitalize(result.entityType)} Summaries`, ''];
|
|
62
|
+
for (const s of result.summaries) {
|
|
63
|
+
if (!s.found || !s.data) {
|
|
64
|
+
lines.push(`**${s.identifier}** — not found`);
|
|
65
|
+
lines.push('');
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const d = s.data;
|
|
69
|
+
lines.push(`**${d.name ?? d.symbol ?? s.identifier}**`);
|
|
70
|
+
for (const [key, value] of Object.entries(d)) {
|
|
71
|
+
if (value == null || key === 'name' || key === 'symbol')
|
|
72
|
+
continue;
|
|
73
|
+
if (Array.isArray(value)) {
|
|
74
|
+
if (value.length === 0)
|
|
75
|
+
continue;
|
|
76
|
+
const display = value.length > 10
|
|
77
|
+
? `${value.slice(0, 10).join(', ')} (+${value.length - 10} more)`
|
|
78
|
+
: value.join(', ');
|
|
79
|
+
lines.push(` ${formatKey(key)}: ${display}`);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
lines.push(` ${formatKey(key)}: ${value}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
lines.push('');
|
|
86
|
+
}
|
|
87
|
+
return [{ type: 'text', text: lines.join('\n') }];
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
// ── Summary extraction per entity type ──────────────────────────────
|
|
91
|
+
function extractSummary(entityType, raw) {
|
|
92
|
+
switch (entityType) {
|
|
93
|
+
case 'assay':
|
|
94
|
+
return {
|
|
95
|
+
aid: raw.AID,
|
|
96
|
+
name: raw.Name ?? raw.AssayName,
|
|
97
|
+
description: Array.isArray(raw.Description)
|
|
98
|
+
? raw.Description.join('\n')
|
|
99
|
+
: raw.Description,
|
|
100
|
+
sourceName: raw.SourceName,
|
|
101
|
+
numSubstances: raw.NumberOfSubstances ?? raw.TotalSIDCount,
|
|
102
|
+
numActive: raw.ActiveSidCount ?? raw.ActiveCount,
|
|
103
|
+
};
|
|
104
|
+
case 'gene':
|
|
105
|
+
return {
|
|
106
|
+
geneId: raw.GeneID,
|
|
107
|
+
symbol: raw.Symbol,
|
|
108
|
+
name: raw.Name,
|
|
109
|
+
taxonomyId: raw.TaxID ?? raw.TaxonomyID,
|
|
110
|
+
taxonomy: raw.Taxonomy ?? raw.ScientificName,
|
|
111
|
+
description: raw.Description ?? raw.Summary,
|
|
112
|
+
synonyms: raw.Synonym ?? raw.OtherNames,
|
|
113
|
+
};
|
|
114
|
+
case 'protein':
|
|
115
|
+
return {
|
|
116
|
+
proteinAccession: raw.ProteinAccession ?? raw.Accession,
|
|
117
|
+
name: raw.Name ?? raw.Title,
|
|
118
|
+
taxonomyId: raw.TaxID ?? raw.TaxonomyID,
|
|
119
|
+
taxonomy: raw.Taxonomy ?? raw.ScientificName,
|
|
120
|
+
synonyms: raw.Synonym ?? raw.OtherNames,
|
|
121
|
+
};
|
|
122
|
+
case 'taxonomy':
|
|
123
|
+
return {
|
|
124
|
+
taxonomyId: raw.TaxonomyID ?? raw.TaxID,
|
|
125
|
+
scientificName: raw.ScientificName,
|
|
126
|
+
commonName: raw.CommonName,
|
|
127
|
+
rank: raw.Rank,
|
|
128
|
+
lineage: raw.Lineage ?? raw.ParentTaxList,
|
|
129
|
+
};
|
|
130
|
+
default:
|
|
131
|
+
return raw;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function capitalize(s) {
|
|
135
|
+
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
136
|
+
}
|
|
137
|
+
function formatKey(key) {
|
|
138
|
+
return key
|
|
139
|
+
.replace(/([A-Z])/g, ' $1')
|
|
140
|
+
.replace(/^./, (s) => s.toUpperCase())
|
|
141
|
+
.trim();
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=get-summary.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-summary.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-summary.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAIxE,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,qBAAqB,EAAE;IACpD,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,gGAAgG;QAChG,yEAAyE;IAC3E,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;KACpB;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,cAAc,CAAC,QAAQ,CAAC,wDAAwD,CAAC;QAC7F,WAAW,EAAE,CAAC;aACX,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aACxC,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,EAAE,CAAC;aACP,QAAQ,CACP,0DAA0D;YACxD,sCAAsC;YACtC,yCAAyC;YACzC,0DAA0D;YAC1D,0CAA0C,CAC7C;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,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;AAChD,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,OAAO,GAAG;SACP,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;SAC1B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SACrC,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tool definition barrel — all PubChem MCP tools.
|
|
3
|
+
* @module mcp-server/tools/definitions
|
|
4
|
+
*/
|
|
5
|
+
export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
6
|
+
cid: import("zod").ZodNumber;
|
|
7
|
+
outcomeFilter: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
8
|
+
active: "active";
|
|
9
|
+
inactive: "inactive";
|
|
10
|
+
all: "all";
|
|
11
|
+
}>>;
|
|
12
|
+
maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
13
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
14
|
+
cid: import("zod").ZodNumber;
|
|
15
|
+
totalAssays: import("zod").ZodNumber;
|
|
16
|
+
activeCount: import("zod").ZodNumber;
|
|
17
|
+
inactiveCount: import("zod").ZodNumber;
|
|
18
|
+
results: import("zod").ZodArray<import("zod").ZodObject<{
|
|
19
|
+
aid: import("zod").ZodNumber;
|
|
20
|
+
assayName: import("zod").ZodString;
|
|
21
|
+
outcome: import("zod").ZodString;
|
|
22
|
+
targetAccession: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
|
+
targetGeneId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
24
|
+
activityValues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
25
|
+
name: import("zod").ZodString;
|
|
26
|
+
value: import("zod").ZodNumber;
|
|
27
|
+
unit: import("zod").ZodString;
|
|
28
|
+
}, import("zod/v4/core").$strip>>;
|
|
29
|
+
}, import("zod/v4/core").$strip>>;
|
|
30
|
+
}, import("zod/v4/core").$strip>> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
31
|
+
cids: import("zod").ZodArray<import("zod").ZodNumber>;
|
|
32
|
+
properties: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
33
|
+
[x: string]: string;
|
|
34
|
+
}>>>;
|
|
35
|
+
includeDescription: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
36
|
+
includeSynonyms: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
37
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
38
|
+
compounds: import("zod").ZodArray<import("zod").ZodObject<{
|
|
39
|
+
cid: import("zod").ZodNumber;
|
|
40
|
+
properties: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
41
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
42
|
+
synonyms: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
43
|
+
}, import("zod/v4/core").$strip>>;
|
|
44
|
+
}, import("zod/v4/core").$strip>> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
45
|
+
cid: import("zod").ZodNumber;
|
|
46
|
+
size: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
47
|
+
small: "small";
|
|
48
|
+
large: "large";
|
|
49
|
+
}>>;
|
|
50
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
51
|
+
cid: import("zod").ZodNumber;
|
|
52
|
+
imageBase64: import("zod").ZodString;
|
|
53
|
+
mimeType: import("zod").ZodString;
|
|
54
|
+
width: import("zod").ZodNumber;
|
|
55
|
+
height: import("zod").ZodNumber;
|
|
56
|
+
}, import("zod/v4/core").$strip>> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
57
|
+
cid: import("zod").ZodNumber;
|
|
58
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
59
|
+
cid: import("zod").ZodNumber;
|
|
60
|
+
hasData: import("zod").ZodBoolean;
|
|
61
|
+
ghs: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
62
|
+
signalWord: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
pictograms: import("zod").ZodArray<import("zod").ZodString>;
|
|
64
|
+
hazardStatements: import("zod").ZodArray<import("zod").ZodObject<{
|
|
65
|
+
code: import("zod").ZodString;
|
|
66
|
+
statement: import("zod").ZodString;
|
|
67
|
+
}, import("zod/v4/core").$strip>>;
|
|
68
|
+
precautionaryStatements: import("zod").ZodArray<import("zod").ZodObject<{
|
|
69
|
+
code: import("zod").ZodString;
|
|
70
|
+
statement: import("zod").ZodString;
|
|
71
|
+
}, import("zod/v4/core").$strip>>;
|
|
72
|
+
}, import("zod/v4/core").$strip>>;
|
|
73
|
+
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
+
}, import("zod/v4/core").$strip>> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
75
|
+
cid: import("zod").ZodNumber;
|
|
76
|
+
xrefTypes: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
77
|
+
[x: string]: string;
|
|
78
|
+
}>>;
|
|
79
|
+
maxPerType: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
80
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
81
|
+
cid: import("zod").ZodNumber;
|
|
82
|
+
xrefs: import("zod").ZodArray<import("zod").ZodObject<{
|
|
83
|
+
type: import("zod").ZodString;
|
|
84
|
+
ids: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
85
|
+
totalAvailable: import("zod").ZodNumber;
|
|
86
|
+
truncated: import("zod").ZodBoolean;
|
|
87
|
+
}, import("zod/v4/core").$strip>>;
|
|
88
|
+
}, import("zod/v4/core").$strip>> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
89
|
+
entityType: import("zod").ZodEnum<{
|
|
90
|
+
assay: "assay";
|
|
91
|
+
gene: "gene";
|
|
92
|
+
protein: "protein";
|
|
93
|
+
taxonomy: "taxonomy";
|
|
94
|
+
}>;
|
|
95
|
+
identifiers: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
96
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
97
|
+
entityType: import("zod").ZodString;
|
|
98
|
+
summaries: import("zod").ZodArray<import("zod").ZodObject<{
|
|
99
|
+
identifier: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
100
|
+
found: import("zod").ZodBoolean;
|
|
101
|
+
data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
102
|
+
}, import("zod/v4/core").$strip>>;
|
|
103
|
+
}, import("zod/v4/core").$strip>> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
104
|
+
targetType: import("zod").ZodEnum<{
|
|
105
|
+
proteinaccession: "proteinaccession";
|
|
106
|
+
genesymbol: "genesymbol";
|
|
107
|
+
proteinname: "proteinname";
|
|
108
|
+
geneid: "geneid";
|
|
109
|
+
}>;
|
|
110
|
+
targetQuery: import("zod").ZodString;
|
|
111
|
+
maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
112
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
113
|
+
targetType: import("zod").ZodString;
|
|
114
|
+
targetQuery: import("zod").ZodString;
|
|
115
|
+
totalFound: import("zod").ZodNumber;
|
|
116
|
+
aids: import("zod").ZodArray<import("zod").ZodNumber>;
|
|
117
|
+
}, import("zod/v4/core").$strip>> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
118
|
+
searchType: import("zod").ZodEnum<{
|
|
119
|
+
substructure: "substructure";
|
|
120
|
+
superstructure: "superstructure";
|
|
121
|
+
similarity: "similarity";
|
|
122
|
+
identifier: "identifier";
|
|
123
|
+
formula: "formula";
|
|
124
|
+
}>;
|
|
125
|
+
identifierType: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
126
|
+
smiles: "smiles";
|
|
127
|
+
name: "name";
|
|
128
|
+
inchikey: "inchikey";
|
|
129
|
+
}>>;
|
|
130
|
+
identifiers: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
131
|
+
formula: import("zod").ZodOptional<import("zod").ZodString>;
|
|
132
|
+
allowOtherElements: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
133
|
+
query: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
+
queryType: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
135
|
+
smiles: "smiles";
|
|
136
|
+
cid: "cid";
|
|
137
|
+
}>>;
|
|
138
|
+
threshold: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
139
|
+
maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
140
|
+
properties: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
141
|
+
[x: string]: string;
|
|
142
|
+
}>>>;
|
|
143
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
144
|
+
searchType: import("zod").ZodString;
|
|
145
|
+
totalFound: import("zod").ZodNumber;
|
|
146
|
+
results: import("zod").ZodArray<import("zod").ZodObject<{
|
|
147
|
+
cid: import("zod").ZodNumber;
|
|
148
|
+
identifier: import("zod").ZodOptional<import("zod").ZodString>;
|
|
149
|
+
properties: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
150
|
+
}, import("zod/v4/core").$strip>>;
|
|
151
|
+
}, import("zod/v4/core").$strip>>)[];
|
|
152
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAS9B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tool definition barrel — all PubChem MCP tools.
|
|
3
|
+
* @module mcp-server/tools/definitions
|
|
4
|
+
*/
|
|
5
|
+
import { getBioactivity } from './get-bioactivity.tool.js';
|
|
6
|
+
import { getCompoundDetails } from './get-compound-details.tool.js';
|
|
7
|
+
import { getCompoundImage } from './get-compound-image.tool.js';
|
|
8
|
+
import { getCompoundSafety } from './get-compound-safety.tool.js';
|
|
9
|
+
import { getCompoundXrefs } from './get-compound-xrefs.tool.js';
|
|
10
|
+
import { getSummary } from './get-summary.tool.js';
|
|
11
|
+
import { searchAssays } from './search-assays.tool.js';
|
|
12
|
+
import { searchCompounds } from './search-compounds.tool.js';
|
|
13
|
+
export const allToolDefinitions = [
|
|
14
|
+
searchCompounds,
|
|
15
|
+
getCompoundDetails,
|
|
16
|
+
getCompoundImage,
|
|
17
|
+
getCompoundXrefs,
|
|
18
|
+
getCompoundSafety,
|
|
19
|
+
getBioactivity,
|
|
20
|
+
searchAssays,
|
|
21
|
+
getSummary,
|
|
22
|
+
];
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,eAAe;IACf,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,YAAY;IACZ,UAAU;CACX,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Find PubChem bioassays by biological target (gene symbol,
|
|
3
|
+
* protein name, Gene ID, or UniProt accession).
|
|
4
|
+
* @module mcp-server/tools/definitions/search-assays
|
|
5
|
+
*/
|
|
6
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
export declare const searchAssays: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
|
+
targetType: z.ZodEnum<{
|
|
9
|
+
proteinaccession: "proteinaccession";
|
|
10
|
+
genesymbol: "genesymbol";
|
|
11
|
+
proteinname: "proteinname";
|
|
12
|
+
geneid: "geneid";
|
|
13
|
+
}>;
|
|
14
|
+
targetQuery: z.ZodString;
|
|
15
|
+
maxResults: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
targetType: z.ZodString;
|
|
18
|
+
targetQuery: z.ZodString;
|
|
19
|
+
totalFound: z.ZodNumber;
|
|
20
|
+
aids: z.ZodArray<z.ZodNumber>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
//# sourceMappingURL=search-assays.tool.d.ts.map
|
|
@@ -0,0 +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;AAGjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;kBAkFvB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Find PubChem bioassays by biological target (gene symbol,
|
|
3
|
+
* protein name, Gene ID, or UniProt accession).
|
|
4
|
+
* @module mcp-server/tools/definitions/search-assays
|
|
5
|
+
*/
|
|
6
|
+
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
import { getPubChemClient } from '../../../services/pubchem/pubchem-client.js';
|
|
8
|
+
export const searchAssays = tool('pubchem_search_assays', {
|
|
9
|
+
title: 'Search Assays',
|
|
10
|
+
description: 'Find PubChem bioassays associated with a biological target. Search by gene symbol ' +
|
|
11
|
+
'(e.g. "EGFR"), protein name, NCBI Gene ID, or UniProt accession. Returns assay IDs (AIDs) ' +
|
|
12
|
+
'which can be explored further with pubchem_get_summary.',
|
|
13
|
+
annotations: {
|
|
14
|
+
readOnlyHint: true,
|
|
15
|
+
destructiveHint: false,
|
|
16
|
+
idempotentHint: true,
|
|
17
|
+
openWorldHint: true,
|
|
18
|
+
},
|
|
19
|
+
input: z.object({
|
|
20
|
+
targetType: z
|
|
21
|
+
.enum(['genesymbol', 'proteinname', 'geneid', 'proteinaccession'])
|
|
22
|
+
.describe('Target identifier type. "genesymbol" and "proteinname" accept text names. ' +
|
|
23
|
+
'"geneid" accepts NCBI Gene IDs. "proteinaccession" accepts UniProt accessions.'),
|
|
24
|
+
targetQuery: z
|
|
25
|
+
.string()
|
|
26
|
+
.describe('Target identifier. Examples: "EGFR" (genesymbol), "Epidermal growth factor receptor" ' +
|
|
27
|
+
'(proteinname), "1956" (geneid), "P00533" (proteinaccession).'),
|
|
28
|
+
maxResults: z
|
|
29
|
+
.number()
|
|
30
|
+
.min(1)
|
|
31
|
+
.max(200)
|
|
32
|
+
.default(50)
|
|
33
|
+
.describe('Max AIDs to return (1-200). Popular targets may have thousands of assays. Default: 50.'),
|
|
34
|
+
}),
|
|
35
|
+
output: z.object({
|
|
36
|
+
targetType: z.string().describe('Target identifier type used.'),
|
|
37
|
+
targetQuery: z.string().describe('Target identifier searched.'),
|
|
38
|
+
totalFound: z.number().describe('Total AIDs found.'),
|
|
39
|
+
aids: z.array(z.number()).describe('PubChem Assay IDs.'),
|
|
40
|
+
}),
|
|
41
|
+
async handler(input, ctx) {
|
|
42
|
+
const client = getPubChemClient();
|
|
43
|
+
const allAids = await client.searchAssaysByTarget(input.targetType, input.targetQuery);
|
|
44
|
+
const totalFound = allAids.length;
|
|
45
|
+
const aids = allAids.slice(0, input.maxResults);
|
|
46
|
+
ctx.log.info('Assay search completed', {
|
|
47
|
+
targetType: input.targetType,
|
|
48
|
+
targetQuery: input.targetQuery,
|
|
49
|
+
totalFound,
|
|
50
|
+
returned: aids.length,
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
targetType: input.targetType,
|
|
54
|
+
targetQuery: input.targetQuery,
|
|
55
|
+
totalFound,
|
|
56
|
+
aids,
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
format(result) {
|
|
60
|
+
const truncated = result.totalFound > result.aids.length
|
|
61
|
+
? ` (showing ${result.aids.length} of ${result.totalFound})`
|
|
62
|
+
: '';
|
|
63
|
+
const lines = [
|
|
64
|
+
`Found ${result.totalFound} assay${result.totalFound !== 1 ? 's' : ''} for "${result.targetQuery}" (${result.targetType})${truncated}`,
|
|
65
|
+
'',
|
|
66
|
+
];
|
|
67
|
+
if (result.aids.length > 0) {
|
|
68
|
+
lines.push(`AIDs: ${result.aids.join(', ')}`);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
lines.push('No assays found.');
|
|
72
|
+
}
|
|
73
|
+
return [{ type: 'text', text: lines.join('\n') }];
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=search-assays.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-assays.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-assays.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,uBAAuB,EAAE;IACxD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,oFAAoF;QACpF,4FAA4F;QAC5F,yDAAyD;IAC3D,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;KACpB;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC;aACV,IAAI,CAAC,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;aACjE,QAAQ,CACP,4EAA4E;YAC1E,gFAAgF,CACnF;QACH,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,QAAQ,CACP,uFAAuF;YACrF,8DAA8D,CACjE;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,wFAAwF,CACzF;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,C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C,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,MAAM,CAAC,WAAW,MAAM,MAAM,CAAC,UAAU,IAAI,SAAS,EAAE;YACtI,EAAE;SACH,CAAC;QAEF,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACjC,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"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Search PubChem for chemical compounds by name, SMILES, InChIKey,
|
|
3
|
+
* formula, substructure, superstructure, or 2D similarity.
|
|
4
|
+
* @module mcp-server/tools/definitions/search-compounds
|
|
5
|
+
*/
|
|
6
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
export declare const searchCompounds: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
|
+
searchType: z.ZodEnum<{
|
|
9
|
+
substructure: "substructure";
|
|
10
|
+
superstructure: "superstructure";
|
|
11
|
+
similarity: "similarity";
|
|
12
|
+
identifier: "identifier";
|
|
13
|
+
formula: "formula";
|
|
14
|
+
}>;
|
|
15
|
+
identifierType: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
smiles: "smiles";
|
|
17
|
+
name: "name";
|
|
18
|
+
inchikey: "inchikey";
|
|
19
|
+
}>>;
|
|
20
|
+
identifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
formula: z.ZodOptional<z.ZodString>;
|
|
22
|
+
allowOtherElements: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
query: z.ZodOptional<z.ZodString>;
|
|
24
|
+
queryType: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
smiles: "smiles";
|
|
26
|
+
cid: "cid";
|
|
27
|
+
}>>;
|
|
28
|
+
threshold: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
maxResults: z.ZodDefault<z.ZodNumber>;
|
|
30
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
31
|
+
[x: string]: string;
|
|
32
|
+
}>>>;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
searchType: z.ZodString;
|
|
35
|
+
totalFound: z.ZodNumber;
|
|
36
|
+
results: z.ZodArray<z.ZodObject<{
|
|
37
|
+
cid: z.ZodNumber;
|
|
38
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
39
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
//# sourceMappingURL=search-compounds.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-compounds.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-compounds.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAgBjD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoO1B,CAAC"}
|