get_assay_info
Retrieve detailed information for a specific assay using its ChEMBL assay ID. Access essential data for analysis and decision-making in drug discovery and research.
Instructions
Get detailed information for a specific assay by ChEMBL assay ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chembl_id | Yes | ChEMBL assay ID (e.g., CHEMBL1217643) |
Implementation Reference
- src/index.ts:1113-1124 (handler)The handler function for the 'get_assay_info' tool. Validates the chembl_id argument, fetches assay data from the ChEMBL API, and returns the data as JSON text.private async handleGetAssayInfo(args: any) { if (!isValidChemblIdArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments'); } try { const response = await this.apiClient.get(`/assay/${args.chembl_id}.json`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] }; } catch (error) { throw new McpError(ErrorCode.InternalError, `Failed to get assay info: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
- src/index.ts:769-770 (registration)The switch case in the CallToolRequestSchema handler that routes calls to 'get_assay_info' to its handler function.case 'get_assay_info': return await this.handleGetAssayInfo(args);
- src/index.ts:535-545 (schema)The tool registration entry in ListToolsRequestSchema response, including name, description, and input schema (object with required 'chembl_id' string).{ name: 'get_assay_info', description: 'Get detailed information for a specific assay by ChEMBL assay ID', inputSchema: { type: 'object', properties: { chembl_id: { type: 'string', description: 'ChEMBL assay ID (e.g., CHEMBL1217643)' }, }, required: ['chembl_id'], }, },
- src/index.ts:90-99 (helper)Helper type guard function used to validate arguments for get_assay_info and similar tools requiring a chembl_id string.const isValidChemblIdArgs = ( args: any ): args is { chembl_id: string } => { return ( typeof args === 'object' && args !== null && typeof args.chembl_id === 'string' && args.chembl_id.length > 0 ); };
- src/index.ts:63-74 (schema)TypeScript interface defining the structure of assay information, used in the codebase for type safety.interface AssayInfo { assay_chembl_id: string; description: string; assay_type: string; assay_organism?: string; assay_strain?: string; assay_tissue?: string; assay_cell_type?: string; assay_subcellular_fraction?: string; target_chembl_id?: string; confidence_score?: number; }