Skip to main content
Glama
Augmented-Nature

Reactome MCP Server

get_pathway_reactions

Retrieve all biochemical reactions for a specific Reactome pathway using its stable identifier to analyze pathway components and interactions.

Instructions

Get all biochemical reactions within a pathway

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesReactome pathway stable identifier

Implementation Reference

  • Main handler function that validates input, resolves pathway ID, fetches contained events from Reactome API, filters for reactions, and returns formatted reaction list.
    private async handleGetPathwayReactions(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,
          };
        }
    
        const response = await this.apiClient.get(`/data/pathway/${pathwayId}/containedEvents`);
    
        // Filter for reactions only
        const reactions = response.data?.filter((event: any) =>
          event.schemaClass === 'Reaction' || event.schemaClass === 'BlackBoxEvent'
        ) || [];
    
        const pathwayReactions = {
          pathwayId: pathwayId,
          originalQuery: args.id,
          reactionCount: reactions.length,
          reactions: reactions.map((reaction: any) => ({
            id: reaction.stId,
            name: reaction.name,
            type: reaction.schemaClass,
            reversible: reaction.reversible,
            species: reaction.species?.[0]?.name,
            url: `https://reactome.org/content/detail/${reaction.stId}`
          }))
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(pathwayReactions, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error getting pathway reactions: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema defining the required 'id' parameter for the tool.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'string', description: 'Reactome pathway stable identifier' },
      },
      required: ['id'],
    },
  • src/index.ts:293-303 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    {
      name: 'get_pathway_reactions',
      description: 'Get all biochemical reactions within a pathway',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Reactome pathway stable identifier' },
        },
        required: ['id'],
      },
    },
  • src/index.ts:339-340 (registration)
    Dispatcher case in the CallToolRequestSchema handler that routes to the specific handler function.
    case 'get_pathway_reactions':
      return this.handleGetPathwayReactions(args);
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. While 'Get' implies a read operation, the description doesn't address important behavioral aspects like whether this returns all reactions at once or uses pagination, what format the reactions are returned in, whether there are rate limits, or what happens with invalid pathway identifiers. For a read operation with zero annotation coverage, this is insufficient.

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 communicates the core purpose without unnecessary words. It's appropriately sized for a simple retrieval tool and front-loads the essential information.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what format the reactions are returned in, whether there are limitations on the data returned, or what constitutes a 'biochemical reaction' in this context. The agent would need to guess about the output structure and behavioral characteristics.

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, with the single parameter 'id' clearly documented as 'Reactome pathway stable identifier.' The description adds no additional parameter information beyond what's already in the schema. With complete schema coverage, the baseline score of 3 is appropriate.

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 action ('Get all biochemical reactions') and target resource ('within a pathway'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from potential sibling tools like 'get_pathway_details' or 'get_pathway_participants' that might also retrieve pathway-related information.

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 about when to use this tool versus alternatives. With multiple sibling tools available (find_pathways_by_disease, get_pathway_details, get_pathway_hierarchy, etc.), there's no indication of when this specific reaction-focused query is appropriate versus other pathway-related queries.

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