Skip to main content
Glama

search_activities

Search bioactivity and assay results from the ChEMBL database using filters for target, assay, compound, and activity type to retrieve relevant data.

Instructions

Search bioactivity measurements and assay results

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic of the 'search_activities' tool by querying the ChEMBL /activity.json API endpoint with optional filters for target, molecule, and activity type.
    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'}`); } }
  • Input schema definition for the 'search_activities' tool, defining parameters for filtering bioactivity data.
    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 switch statement, dispatching to the handler.
    case 'search_activities': return await this.handleSearchActivities(args);
  • Helper validation function to check arguments for the 'search_activities' tool, matching the input schema (though not explicitly called in the handler).
    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) ); };

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