get_target_info
Retrieve comprehensive details for a specific biological target using its ChEMBL ID. Access curated information to support research and analysis on target-related data.
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 for the 'get_target_info' tool. Validates input, fetches target data from ChEMBL API using the provided chembl_id, and returns the 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 the list of available tools, including name, description, and input schema definition.{ 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)Switch case in CallToolRequestSchema handler that routes calls to the get_target_info tool to its handler function.case 'get_target_info': return await this.handleGetTargetInfo(args);
- src/index.ts:90-99 (schema)Type guard function used for input validation in the get_target_info handler, ensuring args has a valid 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 ); };