Skip to main content
Glama
Augmented-Nature

ChEMBL MCP Server

search_activities

Find bioactivity measurements and assay results for compounds, targets, or assays using ChEMBL IDs and activity types.

Instructions

Search bioactivity measurements and assay results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_chembl_idNoChEMBL target ID filter
assay_chembl_idNoChEMBL assay ID filter
molecule_chembl_idNoChEMBL compound ID filter
activity_typeNoActivity type (e.g., IC50, Ki, EC50)
limitNoNumber of results to return (1-1000, default: 25)

Implementation Reference

  • The core handler function that implements the search_activities tool logic. It constructs query parameters from input arguments and fetches bioactivity data from the ChEMBL API /activity.json endpoint.
    private async handleSearchActivities(args: any) {
      try {
        const params: any = { limit: args.limit || 25 };
        if (args.target_chembl_id) params.target_chembl_id = args.target_chembl_id;
        if (args.molecule_chembl_id) params.molecule_chembl_id = args.molecule_chembl_id;
        if (args.activity_type) params.standard_type = args.activity_type;
    
        const response = await this.apiClient.get('/activity.json', { params });
        return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] };
      } catch (error) {
        throw new McpError(ErrorCode.InternalError, `Failed to search activities: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • The input schema definition for the search_activities tool, specifying parameters like target_chembl_id, assay_chembl_id, molecule_chembl_id, activity_type, and limit.
      name: 'search_activities',
      description: 'Search bioactivity measurements and assay results',
      inputSchema: {
        type: 'object',
        properties: {
          target_chembl_id: { type: 'string', description: 'ChEMBL target ID filter' },
          assay_chembl_id: { type: 'string', description: 'ChEMBL assay ID filter' },
          molecule_chembl_id: { type: 'string', description: 'ChEMBL compound ID filter' },
          activity_type: { type: 'string', description: 'Activity type (e.g., IC50, Ki, EC50)' },
          limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
        },
        required: [],
      },
    },
  • src/index.ts:767-768 (registration)
    Registration of the search_activities tool in the CallToolRequestSchema handler switch statement, routing calls to the handleSearchActivities method.
    case 'search_activities':
      return await this.handleSearchActivities(args);
  • Input validation helper function for search_activities tool arguments, ensuring valid types and at least one filter is provided.
    const isValidActivitySearchArgs = (
      args: any
    ): args is { target_chembl_id?: string; assay_chembl_id?: string; molecule_chembl_id?: string; activity_type?: string; limit?: number } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        (args.target_chembl_id === undefined || typeof args.target_chembl_id === 'string') &&
        (args.assay_chembl_id === undefined || typeof args.assay_chembl_id === 'string') &&
        (args.molecule_chembl_id === undefined || typeof args.molecule_chembl_id === 'string') &&
        (args.activity_type === undefined || typeof args.activity_type === 'string') &&
        (args.limit === undefined || (typeof args.limit === 'number' && args.limit > 0 && args.limit <= 1000)) &&
        (args.target_chembl_id !== undefined || args.assay_chembl_id !== undefined || args.molecule_chembl_id !== undefined)
      );
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions searching but doesn't describe what the search returns (format, structure), whether it's paginated, performance characteristics, or any limitations beyond what parameters imply. For a search tool with 5 parameters and no output schema, this is a significant gap.

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 states the core purpose without unnecessary words. It's appropriately sized for a search tool and front-loads the essential information.

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 search tool with 5 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what results look like, how they're structured, or any behavioral aspects. With rich sibling tools and complex search functionality, more context about the tool's behavior and output 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?

Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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 as searching 'bioactivity measurements and assay results' with a specific verb ('search') and resource type. It distinguishes from obvious siblings like 'search_compounds' or 'search_targets' by focusing on activity data, but doesn't explicitly differentiate from 'search_by_activity_type' or 'compare_activities' which might overlap.

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?

No guidance is provided about when to use this tool versus alternatives. With multiple search-related siblings like 'search_by_activity_type', 'search_compounds', 'search_targets', and 'compare_activities', the description offers no context about appropriate use cases, prerequisites, or distinctions from similar tools.

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