get_target_info
Retrieve detailed biological target information using ChEMBL target IDs to support drug discovery research and analysis.
Instructions
Get detailed information for a specific target by ChEMBL target ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chembl_id | Yes | ChEMBL target ID (e.g., CHEMBL2095173) |
Implementation Reference
- src/index.ts:976-987 (handler)The main handler function that implements the get_target_info tool. It validates input, fetches target data from ChEMBL API endpoint /target/{chembl_id}.json, and returns formatted JSON response.private async handleGetTargetInfo(args: any) { if (!isValidChemblIdArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments'); } try { const response = await this.apiClient.get(`/target/${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 target info: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
- src/index.ts:472-482 (registration)Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema.{ name: 'get_target_info', description: 'Get detailed information for a specific target by ChEMBL target ID', inputSchema: { type: 'object', properties: { chembl_id: { type: 'string', description: 'ChEMBL target ID (e.g., CHEMBL2095173)' }, }, required: ['chembl_id'], }, },
- src/index.ts:758-759 (registration)Dispatch/registration in CallToolRequestSchema switch statement, routing calls to the handler.case 'get_target_info': return await this.handleGetTargetInfo(args);
- src/index.ts:90-99 (schema)Input validation helper function used by the handler to check chembl_id parameter.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:37-49 (schema)TypeScript interface defining the structure of target information returned by ChEMBL API.interface TargetInfo { target_chembl_id: string; pref_name: string; target_type: string; organism: string; species_group_flag: boolean; target_components?: Array<{ component_id: number; component_type: string; accession?: string; sequence?: string; }>; }