search_targets
Find biological targets by name, type, or organism to support drug discovery and research.
Instructions
Search for biological targets by name or type
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Target name or search query | |
| target_type | No | Target type filter (e.g., SINGLE PROTEIN, PROTEIN COMPLEX) | |
| organism | No | Organism filter | |
| limit | No | Number of results to return (1-1000, default: 25) |
Implementation Reference
- src/index.ts:965-974 (handler)The handler function that implements the core logic of the 'search_targets' tool by querying the ChEMBL '/target/search.json' API endpoint with the search query and limit parameters.private async handleSearchTargets(args: any) { try { const response = await this.apiClient.get('/target/search.json', { params: { q: args.query, limit: args.limit || 25 }, }); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] }; } catch (error) { throw new McpError(ErrorCode.InternalError, `Failed to search targets: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
- src/index.ts:461-470 (schema)The JSON schema defining the input parameters for the 'search_targets' tool, including required 'query' and optional filters.inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Target name or search query' }, target_type: { type: 'string', description: 'Target type filter (e.g., SINGLE PROTEIN, PROTEIN COMPLEX)' }, organism: { type: 'string', description: 'Organism filter' }, limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 }, }, required: ['query'], },
- src/index.ts:459-471 (registration)The tool registration in the ListTools response, defining name, description, and input schema for 'search_targets'.name: 'search_targets', description: 'Search for biological targets by name or type', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Target name or search query' }, target_type: { type: 'string', description: 'Target type filter (e.g., SINGLE PROTEIN, PROTEIN COMPLEX)' }, organism: { type: 'string', description: 'Organism filter' }, limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 }, }, required: ['query'], }, },
- src/index.ts:759-760 (registration)The dispatch case in the CallToolRequestSchema handler that routes calls to the 'search_targets' handler function.return await this.handleGetTargetInfo(args); case 'get_target_compounds':