get_disease_details
Retrieve comprehensive disease information from OpenTargets platform using EFO ID to support gene-drug-disease association research.
Instructions
Get comprehensive disease information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Disease EFO ID |
Implementation Reference
- src/index.ts:602-636 (handler)The handler function that implements the get_disease_details tool. It validates the input args, executes a GraphQL query to fetch disease details (id, name, description) by EFO ID, and returns the response as text content or an error.private async handleGetDiseaseDetails(args: any) { if (!isValidIdArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Disease ID is required'); } try { const query = `query GetDisease($efoId: String!) { disease(efoId: $efoId) { id name description } }`; const response = await this.graphqlClient.post('', { query, variables: { efoId: args.id } }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting disease details: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
- src/index.ts:277-283 (schema)Input schema definition for the get_disease_details tool, specifying the required 'id' parameter as a string (Disease EFO ID).inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Disease EFO ID' }, }, required: ['id'], },
- src/index.ts:274-284 (registration)Registration of the get_disease_details tool in the MCP server's tools list, including name, description, and input schema.{ name: 'get_disease_details', description: 'Get comprehensive disease information', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Disease EFO ID' }, }, required: ['id'], }, },
- src/index.ts:302-303 (registration)Dispatch case in the main request handler that routes 'get_disease_details' calls to the specific handler method.case 'get_disease_details': return this.handleGetDiseaseDetails(args);