Skip to main content
Glama
Augmented-Nature

Reactome MCP Server

get_pathway_details

Retrieve comprehensive biological pathway information from Reactome using stable identifiers to analyze molecular interactions and systems biology data.

Instructions

Get comprehensive information about a specific pathway

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesReactome pathway stable identifier (e.g., R-HSA-68886)

Implementation Reference

  • Main execution logic for the get_pathway_details tool: validates args, resolves pathway ID, fetches basic info and additional data (components, participants) from Reactome API, formats response.
    private async handleGetPathwayDetails(args: any) {
      if (!isValidIdArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Pathway ID is required');
      }
    
      try {
        // Resolve pathway ID if it's a name
        const pathwayId = await this.resolvePathwayId(args.id);
        if (!pathwayId) {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  error: `No pathway found for identifier: ${args.id}`,
                  suggestion: 'Try using a Reactome stable identifier (e.g., R-HSA-1640170) or search for the pathway first'
                }, null, 2),
              },
            ],
            isError: true,
          };
        }
    
        // Get basic pathway information
        const basicInfo = await this.apiClient.get(`/data/query/${pathwayId}`);
    
        // Try to get additional pathway data using alternative endpoints
        let components = null;
        let participants = null;
    
        try {
          // Try the events endpoint
          const eventsResponse = await this.apiClient.get(`/data/events/${pathwayId}`);
          components = eventsResponse.data;
        } catch (e) {
          // Ignore component fetch errors
        }
    
        try {
          // Try the participants endpoint with different format
          const participantsResponse = await this.apiClient.get(`/data/participants/${pathwayId}`);
          participants = participantsResponse.data;
        } catch (e) {
          // Ignore participants fetch errors
        }
    
        const pathwayDetails = {
          id: pathwayId,
          originalQuery: args.id,
          basicInfo: basicInfo.data,
          components: components || 'Components data not available via API',
          participants: participants || 'Participants data not available via API',
          url: `https://reactome.org/content/detail/${pathwayId}`,
          diagramUrl: `https://reactome.org/PathwayBrowser/#/${pathwayId}`,
          note: 'Some detailed information may not be available through the current API endpoints'
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(pathwayDetails, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error getting pathway details: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:236-246 (registration)
    Tool registration in ListToolsRequestSchema response, including name, description, and input schema definition.
    {
      name: 'get_pathway_details',
      description: 'Get comprehensive information about a specific pathway',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Reactome pathway stable identifier (e.g., R-HSA-68886)' },
        },
        required: ['id'],
      },
    },
  • Input schema definition for get_pathway_details tool: requires 'id' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'string', description: 'Reactome pathway stable identifier (e.g., R-HSA-68886)' },
      },
      required: ['id'],
    },
  • Helper function called by handler to resolve pathway name/identifier to stable Reactome ID.
    private async resolvePathwayId(identifier: string): Promise<string | null> {
      // If it's already a stable identifier, return it
      if (identifier.match(/^R-[A-Z]{3}-\d+$/)) {
        return identifier;
      }
    
      // Search for the pathway by name
      try {
        const searchResponse = await this.apiClient.get('/search/query', {
          params: {
            query: identifier,
            types: 'Pathway',
            cluster: true
          }
        });
    
        if (searchResponse.data.results &&
            searchResponse.data.results.length > 0 &&
            searchResponse.data.results[0].entries &&
            searchResponse.data.results[0].entries.length > 0) {
          const resolvedId = searchResponse.data.results[0].entries[0].stId;
          return resolvedId;
        }
      } catch (error) {
        // Silently handle pathway resolution errors
      }
    
      return null;
  • Input validation helper for ID arguments, used in get_pathway_details handler.
    const isValidIdArgs = (args: any): args is { id: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.id === 'string' &&
        args.id.length > 0
      );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves 'comprehensive information' but doesn't specify what that includes, whether it's read-only, if there are rate limits, or how errors are handled. This leaves significant gaps in understanding the tool's behavior beyond basic purpose.

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 front-loads the core purpose ('Get comprehensive information about a specific pathway') with zero wasted words. It's appropriately sized for a simple tool with one parameter, making it easy to parse quickly.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'comprehensive information' entails, such as data structure, fields, or potential errors, which is crucial for a tool with no structured output documentation. This leaves the agent with insufficient context to use the tool effectively.

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?

The input schema has 100% description coverage, clearly documenting the single required parameter 'id' as a Reactome pathway stable identifier. The description adds no additional parameter semantics beyond what the schema provides, such as examples of comprehensive information returned, so it meets the baseline for high schema coverage without compensating further.

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 tool's purpose with a specific verb ('Get') and resource ('comprehensive information about a specific pathway'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_pathway_hierarchy' or 'get_pathway_participants', which might provide overlapping or related information about pathways.

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 prerequisites, such as needing a pathway ID, or compare it to siblings like 'find_pathways_by_disease' or 'search_pathways', leaving the agent to infer usage based on the name 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/Reactome-MCP-Server'

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