Skip to main content
Glama
Augmented-Nature

ChEMBL MCP Server

assess_drug_likeness

Evaluate compound drug-likeness using Lipinski's Rule of Five and other pharmaceutical metrics to predict oral bioavailability potential.

Instructions

Assess drug-likeness using Lipinski Rule of Five and other metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chembl_idNoChEMBL compound ID
smilesNoSMILES string (alternative to ChEMBL ID)

Implementation Reference

  • src/index.ts:672-683 (registration)
    Tool registration in the ListToolsRequestSchema response, including name, description, and input schema definition.
    {
      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)
    Tool handler dispatch in the CallToolRequestSchema switch statement.
    case 'assess_drug_likeness':
      return await this.handleAssessDrugLikeness(args);
  • The primary handler function that implements the assess_drug_likeness tool logic: fetches ChEMBL compound data, computes Lipinski Rule of Five violations, Veber rules compliance, and generates comprehensive drug-likeness assessment.
    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'}`
        );
      }
    }
  • Supporting helper function called by the handler to provide textual recommendation based on the number of Lipinski violations and Veber rule compliance.
    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';
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Augmented-Nature/ChEMBL-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server