substructure_search
Search PubChem's chemical database to find compounds containing specific molecular substructures using SMILES notation.
Instructions
Find compounds containing a specific substructure
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| smiles | Yes | SMILES string of the substructure query | |
| max_records | No | Maximum number of results (1-10000, default: 100) |
Implementation Reference
- src/index.ts:1012-1014 (handler)The handler function for the 'substructure_search' tool. Currently implemented as a placeholder that returns a 'not yet implemented' message.private async handleSubstructureSearch(args: any) { return { content: [{ type: 'text', text: JSON.stringify({ message: 'Substructure search not yet implemented', args }, null, 2) }] }; }
- src/index.ts:455-464 (schema)Input schema definition for the 'substructure_search' tool, specifying SMILES query and optional max_records.name: 'substructure_search', description: 'Find compounds containing a specific substructure', inputSchema: { type: 'object', properties: { smiles: { type: 'string', description: 'SMILES string of the substructure query' }, max_records: { type: 'number', description: 'Maximum number of results (1-10000, default: 100)', minimum: 1, maximum: 10000 }, }, required: ['smiles'], },
- src/index.ts:756-757 (registration)Dispatch/registration in the main request handler switch statement that routes calls to the substructure_search handler.case 'substructure_search': return await this.handleSubstructureSearch(args);
- src/index.ts:454-465 (registration)Tool object registration in the tools array passed to setTools, including name, description, and schema.{ name: 'substructure_search', description: 'Find compounds containing a specific substructure', inputSchema: { type: 'object', properties: { smiles: { type: 'string', description: 'SMILES string of the substructure query' }, max_records: { type: 'number', description: 'Maximum number of results (1-10000, default: 100)', minimum: 1, maximum: 10000 }, }, required: ['smiles'], }, },