Skip to main content
Glama

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) ); };

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