search_drug_indications
Search for therapeutic indications and disease areas by drug type and specified condition using a structured query on the ChEMBL MCP Server.
Instructions
Search for therapeutic indications and disease areas
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| drug_type | No | Drug type filter (e.g., Small molecule, Antibody) | |
| indication | Yes | Disease or indication search term | |
| limit | No | Number of results to return (1-1000, default: 25) |
Implementation Reference
- src/index.ts:1354-1381 (handler)The main handler function implementing the tool logic. It validates input, queries the ChEMBL /drug_indication.json API endpoint with the indication as 'q' parameter, and returns the JSON response.private async handleSearchDrugIndications(args: any) { if (!args || typeof args.indication !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'Invalid drug indications arguments'); } try { const response = await this.apiClient.get('/drug_indication.json', { params: { q: args.indication, 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 drug indications: ${error instanceof Error ? error.message : 'Unknown error'}` ); } }
- src/index.ts:614-625 (schema)Tool schema definition including input schema for validation, provided in the list of tools.description: 'Search for therapeutic indications and disease areas', inputSchema: { type: 'object', properties: { indication: { type: 'string', description: 'Disease or indication search term' }, drug_type: { type: 'string', description: 'Drug type filter (e.g., Small molecule, Antibody)' }, limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 }, }, required: ['indication'], }, }, {
- src/index.ts:782-783 (registration)Registration of the tool handler in the switch statement for CallToolRequestSchema.case 'search_drug_indications': return await this.handleSearchDrugIndications(args);