Skip to main content
Glama
Augmented-Nature

ChEMBL MCP Server

search_drugs

Find approved drugs and clinical candidates by name, development phase, or therapeutic area using the ChEMBL database.

Instructions

Search for approved drugs and clinical candidates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesDrug name or search query
development_phaseNoDevelopment phase filter (e.g., Approved, Phase III)
therapeutic_areaNoTherapeutic area filter
limitNoNumber of results to return (1-1000, default: 25)

Implementation Reference

  • The main handler function that implements the logic for the 'search_drugs' tool. It performs input validation, queries the ChEMBL molecule search API, filters results for approved drugs and clinical candidates (max_phase >= 1), and returns formatted JSON results.
    private async handleSearchDrugs(args: any) {
      if (!args || typeof args.query !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid drug search arguments');
      }
    
      try {
        // Search for drugs using molecule endpoint with max_phase filter
        const params: any = {
          q: args.query,
          limit: args.limit || 25,
        };
    
        const response = await this.apiClient.get('/molecule/search.json', { params });
        const molecules = response.data.molecules || [];
    
        // Filter for drugs (molecules with max_phase >= 1)
        const drugs = molecules.filter((m: any) => m.max_phase && m.max_phase >= 1);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                query: args.query,
                total_results: drugs.length,
                drugs: drugs,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to search drugs: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • The input schema definition for the 'search_drugs' tool, specifying parameters like query (required), development_phase, therapeutic_area, and limit.
      name: 'search_drugs',
      description: 'Search for approved drugs and clinical candidates',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Drug name or search query' },
          development_phase: { type: 'string', description: 'Development phase filter (e.g., Approved, Phase III)' },
          therapeutic_area: { type: 'string', description: 'Therapeutic area filter' },
          limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
        },
        required: ['query'],
      },
    },
  • src/index.ts:778-779 (registration)
    The registration that maps the tool name 'search_drugs' to its handler function in the CallToolRequestSchema switch statement.
    case 'search_drugs':
      return await this.handleSearchDrugs(args);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves—no information about response format, pagination, rate limits, authentication needs, or error handling. This is inadequate for a search tool with multiple parameters.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized for a search tool, with every word earning its place.

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?

Given the complexity of a search tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the search returns, how results are structured, or any behavioral traits, leaving significant gaps for the agent to navigate.

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?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional parameter semantics beyond implying a search scope ('approved drugs and clinical candidates'), which aligns with but doesn't enhance the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('search') and resource ('approved drugs and clinical candidates'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'search_compounds' or 'search_drug_indications' that might overlap in scope, preventing a perfect score.

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 like 'search_compounds' or 'advanced_search'. It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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