Skip to main content
Glama
Augmented-Nature

ChEMBL MCP Server

predict_solubility

Predict aqueous solubility and permeability properties for chemical compounds using ChEMBL IDs or SMILES strings to assess bioavailability and drug-likeness.

Instructions

Predict aqueous solubility and permeability properties

Input Schema

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

Implementation Reference

  • The handler function for the 'predict_solubility' tool. Fetches molecule data from ChEMBL API using chembl_id, extracts properties like alogp, psa, etc., applies simple rules to predict solubility class and permeability, and returns formatted JSON response.
    private async handlePredictSolubility(args: any) {
      if (!args || (!args.chembl_id && !args.smiles)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid solubility prediction 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 solubility prediction requires ChEMBL ID',
                  smiles: args.smiles,
                }, null, 2),
              },
            ],
          };
        }
    
        const props = molecule.molecule_properties || {};
    
        // Predict solubility based on molecular properties
        const logp = props.alogp || 0;
        const psa = props.psa || 0;
        const mw = props.full_mwt || props.molecular_weight || 0;
        const hbd = props.hbd || 0;
        const hba = props.hba || 0;
    
        // Simple solubility prediction model
        let solubilityClass = 'Moderate';
        let permeability = 'Moderate';
    
        if (logp < 0 && psa > 100) {
          solubilityClass = 'High';
          permeability = 'Low';
        } else if (logp > 5 || psa < 40) {
          solubilityClass = 'Low';
          permeability = 'High';
        } else if (logp > 3 && psa < 70) {
          solubilityClass = 'Low-Moderate';
          permeability = 'High';
        } else if (logp < 2 && psa > 80) {
          solubilityClass = 'Moderate-High';
          permeability = 'Low-Moderate';
        }
    
        const solubilityPrediction = {
          chembl_id: molecule.molecule_chembl_id,
          aqueous_solubility: {
            predicted_class: solubilityClass,
            logp: logp,
            psa: psa,
            factors: {
              lipophilicity: logp > 3 ? 'High (reduces solubility)' : 'Moderate',
              polar_surface_area: psa > 100 ? 'High (increases solubility)' : 'Moderate',
              hydrogen_bonding: `${hbd} donors, ${hba} acceptors`,
            },
          },
          permeability: {
            predicted_class: permeability,
            assessment: this.assessPermeability(props),
          },
          molecular_properties: {
            molecular_weight: mw,
            alogp: logp,
            psa: psa,
            hbd: hbd,
            hba: hba,
          },
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(solubilityPrediction, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to predict solubility: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • Input schema definition for the predict_solubility tool, allowing optional chembl_id or smiles.
    name: 'predict_solubility',
    description: 'Predict aqueous solubility and permeability properties',
    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:792-792 (registration)
    Registration of the predict_solubility handler in the CallToolRequestSchema switch statement.
    return await this.handlePredictSolubility(args);
  • Helper function used by the handler to assess membrane permeability based on PSA and logP.
    private assessPermeability(props: any): string {
      const psa = props.psa || 0;
      const logp = props.alogp || 0;
    
      if (psa < 90 && logp > 0 && logp < 5) {
        return 'Good membrane permeability predicted';
      } else if (psa > 140 || logp < -1) {
        return 'Poor membrane permeability predicted';
      }
      return 'Moderate membrane permeability predicted';
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the prediction function but doesn't cover important aspects like whether this is a read-only operation, if it requires authentication, rate limits, computational cost, or what the output format looks like. For a prediction tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that directly states the tool's function. There's no wasted language or unnecessary elaboration, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a prediction tool with no annotations and no output schema, the description is incomplete. It doesn't explain what specific solubility/permeability properties are predicted, the prediction methodology, confidence metrics, or return format. Given the complexity of chemical property prediction and lack of structured metadata, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description doesn't add any parameter information beyond what's already in the schema (which has 100% coverage). It doesn't explain the relationship between chembl_id and smiles parameters, or provide guidance on when to use one versus the other. With complete schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: predicting aqueous solubility and permeability properties. It uses specific verbs ('predict') and identifies the resource (compound properties), but doesn't explicitly differentiate from sibling tools like 'analyze_admet_properties' or 'assess_drug_likeness' which might overlap in functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or how it differs from related tools like 'analyze_admet_properties' or 'calculate_descriptors' that might handle similar predictions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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