Skip to main content
Glama
Augmented-Nature

Reactome MCP Server

find_pathways_by_disease

Discover biological pathways and mechanisms linked to specific diseases using Reactome pathway data. Input a disease name or DOID identifier to retrieve relevant pathways.

Instructions

Find disease-associated pathways and mechanisms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diseaseYesDisease name or DOID identifier
sizeNoNumber of pathways to return (1-100, default: 25)

Implementation Reference

  • The main handler function that implements the core logic for the 'find_pathways_by_disease' tool. It validates input, queries the Reactome search API for pathways matching the disease name, processes the results, and returns formatted pathway information.
    private async handleFindPathwaysByDisease(args: any) {
      if (!isValidDiseaseArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid disease arguments');
      }
    
      try {
        // Search for disease-related pathways
        const searchResponse = await this.apiClient.get('/search/query', {
          params: {
            query: args.disease,
            types: 'Pathway',
            cluster: true
          }
        });
    
        // Extract pathway entries from result groups
        let pathwayEntries: any[] = [];
        if (searchResponse.data.results) {
          for (const group of searchResponse.data.results) {
            if (group.typeName === 'Pathway' && group.entries) {
              pathwayEntries = pathwayEntries.concat(group.entries);
            }
          }
        }
    
        // Limit results if specified
        if (args.size) {
          pathwayEntries = pathwayEntries.slice(0, args.size);
        }
    
        const diseasePathways = {
          disease: args.disease,
          pathwayCount: pathwayEntries.length,
          pathways: pathwayEntries.map((pathway: any) => ({
            id: pathway.stId || pathway.id,
            name: pathway.name?.replace(/<[^>]*>/g, '') || 'Unknown',
            type: pathway.exactType || pathway.typeName || 'Unknown',
            species: Array.isArray(pathway.species) ? pathway.species[0] : pathway.species || 'Unknown',
            description: (pathway.summation?.substring(0, 200) || 'No description available') + '...',
            url: `https://reactome.org/content/detail/${pathway.stId || pathway.id}`
          }))
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(diseasePathways, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error finding pathways by disease: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • The input schema definition for the 'find_pathways_by_disease' tool, registered in the ListToolsRequestSchema handler. Specifies the expected input parameters: disease (required string) and optional size (number).
    {
      name: 'find_pathways_by_disease',
      description: 'Find disease-associated pathways and mechanisms',
      inputSchema: {
        type: 'object',
        properties: {
          disease: { type: 'string', description: 'Disease name or DOID identifier' },
          size: { type: 'number', description: 'Number of pathways to return (1-100, default: 25)', minimum: 1, maximum: 100 },
        },
        required: ['disease'],
      },
    },
  • src/index.ts:333-334 (registration)
    The switch case in the CallToolRequestSchema handler that routes calls to the 'find_pathways_by_disease' tool to its handler method.
    case 'find_pathways_by_disease':
      return this.handleFindPathwaysByDisease(args);
  • Type guard and validation function for the input arguments of the 'find_pathways_by_disease' tool.
    const isValidDiseaseArgs = (args: any): args is { disease: string; size?: number } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.disease === 'string' &&
        args.disease.length > 0 &&
        (args.size === undefined || (typeof args.size === 'number' && args.size > 0 && args.size <= 100))
      );
    };
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It doesn't disclose whether this is a read-only operation, what data sources are used, potential rate limits, or what the output format looks like. 'Find' implies querying, but no further context is given.

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 with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a straightforward query tool.

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 query tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'pathways and mechanisms' means in this context, what data is returned, or how results are structured, leaving significant gaps for agent understanding.

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 the schema already documents both parameters thoroughly. The description adds no additional parameter meaning beyond what's in the schema, maintaining the baseline score of 3 for adequate coverage through structured data alone.

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 'find' and the resource 'disease-associated pathways and mechanisms', making the purpose immediately understandable. It distinguishes from siblings like find_pathways_by_gene by specifying disease focus, though it doesn't explicitly contrast with other tools like search_pathways or get_pathway_hierarchy.

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. It doesn't mention when to choose it over search_pathways or get_pathway_hierarchy, nor does it specify prerequisites like needing a valid disease identifier or typical use cases.

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/Reactome-MCP-Server'

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