Skip to main content
Glama
Augmented-Nature

OpenTargets MCP Server

get_disease_targets_summary

Retrieve a summary of gene targets associated with a specific disease, filtered by association score and quantity, for gene-drug-disease research analysis.

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 disease-associated targets from Open Targets, processes the top 10 targets into a summary, and returns the result as JSON text.
    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,
        };
      }
    }
  • The tool registration entry defining the name, description, and input schema (diseaseId required, optional minScore and size). Note: minScore is defined but not used in handler.
    {
      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)
    The switch case in the request handler that dispatches calls to this tool to its handler method.
    case 'get_disease_targets_summary':
      return this.handleGetDiseaseTargetsSummary(args);
  • src/index.ts:240-286 (registration)
    The server.setTools call registering all tools including this one (full tools array spans lines ~190-285).
            type: 'object',
            properties: {
              targetId: { type: 'string', description: 'Target Ensembl gene ID' },
              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 results to return (1-500, default: 25)', minimum: 1, maximum: 500 },
            },
            required: [],
          },
        },
        {
          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'],
          },
        },
        {
          name: 'get_target_details',
          description: 'Get comprehensive target information',
          inputSchema: {
            type: 'object',
            properties: {
              id: { type: 'string', description: 'Target Ensembl gene ID' },
            },
            required: ['id'],
          },
        },
        {
          name: 'get_disease_details',
          description: 'Get comprehensive disease information',
          inputSchema: {
            type: 'object',
            properties: {
              id: { type: 'string', description: 'Disease EFO ID' },
            },
            required: ['id'],
          },
        },
      ],
    }));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It doesn't indicate whether this is a read-only operation, what format the 'overview' returns, whether there are rate limits, or authentication requirements. The description doesn't contradict annotations (none exist), but provides inadequate behavioral context for a tool with 3 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a tool with 3 parameters and gets straight to the point. Every word earns its place in conveying the essential function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what an 'overview' contains versus detailed associations, doesn't mention return format or structure, and provides no context about the data source or limitations. The agent lacks critical information to use this tool effectively despite the good parameter documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters are documented in the input schema. The description adds no additional parameter semantics beyond what's already in the schema - it doesn't explain what 'overview' means in relation to the minScore or size parameters, or provide context about disease EFO IDs. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'overview of all targets associated with a disease', making the purpose immediately understandable. It distinguishes this from sibling tools like get_disease_details or get_target_details by focusing on target-disease associations rather than individual entity details. However, it doesn't specify what constitutes an 'overview' versus the more detailed get_target_disease_associations tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like get_target_disease_associations and search_targets available, there's no indication whether this tool provides summarized data, filtered results, or serves a different purpose. The agent must infer usage from the tool name and parameter set alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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