substructure_search
Search for chemical compounds in PubChem containing a specific substructure by entering a SMILES string. Customize results with optional record limits for precise molecular analysis.
Instructions
Find compounds containing a specific substructure
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_records | No | Maximum number of results (1-10000, default: 100) | |
| smiles | Yes | SMILES string of the substructure query |
Implementation Reference
- src/index.ts:1012-1014 (handler)The handler function that executes the substructure_search tool logic. Currently implemented as a placeholder returning 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-465 (schema)Input schema definition for the substructure_search tool, listed in the tools array returned by ListToolsRequestSchema handler.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)Registration and dispatch case in the CallToolRequestSchema handler's switch statement that routes calls to the substructure_search handler.case 'substructure_search': return await this.handleSubstructureSearch(args);