assess_drug_likeness
Evaluate drug-likeness of compounds using Lipinski Rule of Five and additional metrics by providing ChEMBL IDs or SMILES strings on the ChEMBL MCP Server.
Instructions
Assess drug-likeness using Lipinski Rule of Five and other metrics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chembl_id | No | ChEMBL compound ID | |
| smiles | No | SMILES string (alternative to ChEMBL ID) |
Implementation Reference
- src/index.ts:1688-1776 (handler)Main handler function for the 'assess_drug_likeness' tool. Fetches compound properties from ChEMBL API and performs comprehensive drug-likeness assessment using Lipinski's Rule of Five, Veber rules, and provides detailed criteria evaluation and recommendations.private async handleAssessDrugLikeness(args: any) { if (!args || (!args.chembl_id && !args.smiles)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid drug-likeness assessment arguments'); } try { let molecule; if (args.chembl_id) { const response = await this.apiClient.get(`/molecule/${args.chembl_id}.json`); molecule = response.data; } else { return { content: [ { type: 'text', text: JSON.stringify({ message: 'SMILES-based drug-likeness assessment requires ChEMBL ID', smiles: args.smiles, }, null, 2), }, ], }; } const props = molecule.molecule_properties || {}; // Lipinski Rule of Five const mw = props.full_mwt || props.molecular_weight || 0; const logp = props.alogp || 0; const hbd = props.hbd || 0; const hba = props.hba || 0; const lipinskiViolations = [ mw > 500 ? 'Molecular weight > 500 Da' : null, logp > 5 ? 'LogP > 5' : null, hbd > 5 ? 'H-bond donors > 5' : null, hba > 10 ? 'H-bond acceptors > 10' : null, ].filter(v => v !== null); // Veber rules const rtb = props.rtb || 0; const psa = props.psa || 0; const veberPass = rtb <= 10 && psa <= 140; // Overall assessment const drugLikenessAssessment = { chembl_id: molecule.molecule_chembl_id, lipinski_rule_of_five: { violations: lipinskiViolations.length, details: lipinskiViolations.length > 0 ? lipinskiViolations : ['All criteria met'], pass: lipinskiViolations.length === 0, criteria: { molecular_weight: { value: mw, limit: 500, pass: mw <= 500 }, logp: { value: logp, limit: 5, pass: logp <= 5 }, hbd: { value: hbd, limit: 5, pass: hbd <= 5 }, hba: { value: hba, limit: 10, pass: hba <= 10 }, }, }, veber_rules: { pass: veberPass, criteria: { rotatable_bonds: { value: rtb, limit: 10, pass: rtb <= 10 }, psa: { value: psa, limit: 140, pass: psa <= 140 }, }, }, overall_assessment: { drug_likeness: lipinskiViolations.length === 0 ? 'Excellent' : lipinskiViolations.length === 1 ? 'Good' : 'Poor', oral_bioavailability: veberPass && lipinskiViolations.length <= 1 ? 'Likely' : 'Uncertain', recommendation: this.getDrugLikenessRecommendation(lipinskiViolations.length, veberPass), }, molecular_properties: props, }; return { content: [ { type: 'text', text: JSON.stringify(drugLikenessAssessment, null, 2), }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Failed to assess drug-likeness: ${error instanceof Error ? error.message : 'Unknown error'}` ); } }
- src/index.ts:675-682 (schema)Input schema for the assess_drug_likeness tool, defining optional chembl_id or smiles parameters.inputSchema: { type: 'object', properties: { chembl_id: { type: 'string', description: 'ChEMBL compound ID' }, smiles: { type: 'string', description: 'SMILES string (alternative to ChEMBL ID)' }, }, required: [], },
- src/index.ts:673-683 (registration)Registration of the assess_drug_likeness tool in the ListTools response, including name, description, and input schema.name: 'assess_drug_likeness', description: 'Assess drug-likeness using Lipinski Rule of Five and other metrics', inputSchema: { type: 'object', properties: { chembl_id: { type: 'string', description: 'ChEMBL compound ID' }, smiles: { type: 'string', description: 'SMILES string (alternative to ChEMBL ID)' }, }, required: [], }, },
- src/index.ts:793-794 (registration)Dispatch/registration of the tool handler in the CallToolRequestSchema switch statement.case 'assess_drug_likeness': return await this.handleAssessDrugLikeness(args);
- src/index.ts:1777-1786 (helper)Helper function used by the handler to generate textual recommendation for drug-likeness.private getDrugLikenessRecommendation(violations: number, veberPass: boolean): string { if (violations === 0 && veberPass) { return 'Excellent drug-like properties - suitable for oral administration'; } else if (violations <= 1 && veberPass) { return 'Good drug-like properties - likely suitable for development'; } else if (violations <= 2) { return 'Moderate drug-like properties - may require optimization'; } return 'Poor drug-like properties - significant optimization needed'; }