Skip to main content
Glama

get_disease_targets_summary

Retrieve a comprehensive summary of all targets linked to a specific disease using its EFO ID, with options to filter by association score and limit the number of results.

Instructions

Get overview of all targets associated with a disease

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diseaseIdYesDisease EFO ID
minScoreNoMinimum association score (0-1)
sizeNoNumber of targets to return (1-500, default: 50)

Implementation Reference

  • The handler function that validates input, executes a GraphQL query to fetch associated targets for a given disease EFO ID, processes the response to create a summary with top targets, and returns formatted JSON output.
    private async handleGetDiseaseTargetsSummary(args: any) { if (!isValidIdArgs(args) && !args.diseaseId) { throw new McpError(ErrorCode.InvalidParams, 'Disease ID is required'); } try { const diseaseId = args.diseaseId || args.id; const query = `query GetDiseaseTargetsSummary($efoId: String!) { disease(efoId: $efoId) { id name associatedTargets { count rows { target { id approvedSymbol approvedName } score } } } }`; const response = await this.graphqlClient.post('', { query, variables: { efoId: diseaseId, size: args.size || 50 } }); const diseaseData = response.data.data?.disease; const associations = diseaseData?.associatedTargets; const summary = { diseaseId, diseaseName: diseaseData?.name, totalTargets: associations?.count || 0, topTargets: associations?.rows?.slice(0, 10).map((assoc: any) => ({ targetId: assoc.target.id, targetSymbol: assoc.target.approvedSymbol, targetName: assoc.target.approvedName, associationScore: assoc.score, datatypeScores: assoc.datatypeScores, })) || [], fullResults: response.data, }; return { content: [ { type: 'text', text: JSON.stringify(summary, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting disease targets summary: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • JSON schema defining the input parameters for the tool, including required diseaseId and optional minScore and size.
    inputSchema: { type: 'object', properties: { diseaseId: { type: 'string', description: 'Disease EFO ID' }, minScore: { type: 'number', description: 'Minimum association score (0-1)', minimum: 0, maximum: 1 }, size: { type: 'number', description: 'Number of targets to return (1-500, default: 50)', minimum: 1, maximum: 500 }, }, required: ['diseaseId'], },
  • src/index.ts:250-262 (registration)
    Tool registration in the list of available tools, including name, description, and input schema.
    { name: 'get_disease_targets_summary', description: 'Get overview of all targets associated with a disease', inputSchema: { type: 'object', properties: { diseaseId: { type: 'string', description: 'Disease EFO ID' }, minScore: { type: 'number', description: 'Minimum association score (0-1)', minimum: 0, maximum: 1 }, size: { type: 'number', description: 'Number of targets to return (1-500, default: 50)', minimum: 1, maximum: 500 }, }, required: ['diseaseId'], }, },
  • src/index.ts:298-299 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes calls to the specific handler function.
    case 'get_disease_targets_summary': return this.handleGetDiseaseTargetsSummary(args);

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