Skip to main content
Glama

get_disease_details

Retrieve detailed disease information by providing a Disease EFO ID to analyze gene-drug-disease associations using OpenTargets MCP Server data.

Instructions

Get comprehensive disease information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDisease EFO ID

Implementation Reference

  • The handler function for the 'get_disease_details' tool. Validates input, executes a GraphQL query to fetch disease details (id, name, description) from Open Targets API, and returns the JSON response.
    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, }; } }
  • The input schema definition for the 'get_disease_details' tool, specifying an object with a required 'id' string (Disease EFO ID).
    inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Disease EFO ID' }, }, required: ['id'], },
  • src/index.ts:274-284 (registration)
    Tool registration in the list of tools returned by ListToolsRequestHandler, 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)
    Switch case in CallToolRequestHandler that routes calls to 'get_disease_details' to the handleGetDiseaseDetails method.
    case 'get_disease_details': return this.handleGetDiseaseDetails(args);
  • Helper function for validating arguments that expect a single 'id' string, used in get_disease_details handler.
    const isValidIdArgs = (args: any): args is { id: string } => { return ( typeof args === 'object' && args !== null && typeof args.id === 'string' && args.id.length > 0 ); };

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Augmented-Nature/OpenTargets-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server