Skip to main content
Glama
Augmented-Nature

Reactome MCP Server

search_pathways

Find biological pathways in Reactome by searching names, descriptions, or keywords to identify relevant cellular processes and molecular interactions.

Instructions

Search for biological pathways by name, description, or keywords

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (pathway name, process, keywords)
typeNoType of entity to search for (default: pathway)
sizeNoNumber of results to return (1-100, default: 20)

Implementation Reference

  • Main handler function that executes the search_pathways tool: validates args, queries Reactome API /search/query, processes and filters results, formats output.
    private async handleSearchPathways(args: any) {
      if (!isValidSearchArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid search arguments');
      }
    
      try {
        const params: any = {
          query: args.query,
          cluster: true,
        };
    
        if (args.type) {
          params.types = args.type;
        }
    
        const response = await this.apiClient.get('/search/query', { params });
    
        // Extract entries from all result groups
        let allEntries: any[] = [];
        if (response.data.results) {
          for (const group of response.data.results) {
            if (group.entries) {
              allEntries = allEntries.concat(group.entries);
            }
          }
        }
    
        // Filter by type if specified
        if (args.type) {
          const typeFilter = args.type.toLowerCase();
          allEntries = allEntries.filter((entry: any) =>
            entry.exactType?.toLowerCase().includes(typeFilter) ||
            entry.typeName?.toLowerCase().includes(typeFilter)
          );
        }
    
        // Limit results if specified
        if (args.size) {
          allEntries = allEntries.slice(0, args.size);
        }
    
        const formattedResults = {
          query: args.query,
          totalResults: response.data.numberOfMatches || 0,
          returnedResults: allEntries.length,
          results: allEntries.map((item: any) => ({
            id: item.stId || item.id,
            name: item.name?.replace(/<[^>]*>/g, '') || 'Unknown', // Remove HTML tags
            type: item.exactType || item.typeName || 'Unknown',
            species: Array.isArray(item.species) ? item.species[0] : item.species || 'Unknown',
            description: (item.summation?.substring(0, 200) || 'No description available') + '...',
            url: `https://reactome.org/content/detail/${item.stId || item.id}`
          }))
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(formattedResults, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error searching pathways: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema defining parameters for search_pathways tool: query (required), type (enum), size (1-100).
    inputSchema: {
      type: 'object',
      properties: {
        query: { type: 'string', description: 'Search query (pathway name, process, keywords)' },
        type: {
          type: 'string',
          enum: ['pathway', 'reaction', 'protein', 'complex', 'disease'],
          description: 'Type of entity to search for (default: pathway)'
        },
        size: { type: 'number', description: 'Number of results to return (1-100, default: 20)', minimum: 1, maximum: 100 },
      },
      required: ['query'],
    },
  • src/index.ts:219-235 (registration)
    Tool registration in ListToolsRequestSchema handler: defines name, description, and inputSchema for search_pathways.
    {
      name: 'search_pathways',
      description: 'Search for biological pathways by name, description, or keywords',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Search query (pathway name, process, keywords)' },
          type: {
            type: 'string',
            enum: ['pathway', 'reaction', 'protein', 'complex', 'disease'],
            description: 'Type of entity to search for (default: pathway)'
          },
          size: { type: 'number', description: 'Number of results to return (1-100, default: 20)', minimum: 1, maximum: 100 },
        },
        required: ['query'],
      },
    },
  • src/index.ts:327-328 (registration)
    Dispatch registration in CallToolRequestSchema switch statement: routes 'search_pathways' calls to handleSearchPathways.
    case 'search_pathways':
      return this.handleSearchPathways(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 it mentions what can be searched (name, description, keywords), it doesn't describe important behavioral aspects like whether this is a read-only operation, what format results are returned in, whether there are rate limits, authentication requirements, or how search results are ranked/ordered.

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 extremely concise - a single sentence that directly states the tool's function without any unnecessary words. It's front-loaded with the core purpose and efficiently communicates the search scope in minimal text.

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 search tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what kind of results to expect, how they're structured, whether there's pagination, or any error conditions. The description provides basic purpose but lacks the contextual information needed for effective tool use.

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?

With 100% schema description coverage, the input schema already documents all three parameters thoroughly. The description mentions searching by 'name, description, or keywords' which aligns with the 'query' parameter, but doesn't add meaningful semantic context beyond what's already in the schema descriptions for 'type' and 'size' parameters.

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 as searching for biological pathways using specific criteria (name, description, or keywords). It uses a specific verb ('search') and identifies the resource ('biological pathways'), but it doesn't explicitly differentiate from sibling tools like 'find_pathways_by_disease' or 'find_pathways_by_gene' which have more specialized search functions.

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 the available alternatives. With sibling tools like 'find_pathways_by_disease' and 'find_pathways_by_gene' that perform more targeted searches, the description fails to indicate whether this is a general-purpose search tool or how it differs from those specialized options.

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