Skip to main content
Glama

get_protein_pathways

Retrieve biological pathways (KEGG, Reactome) for a protein using its UniProt accession number to understand its functional context.

Instructions

Associated biological pathways (KEGG, Reactome)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number

Implementation Reference

  • The handler function that implements the core logic of the 'get_protein_pathways' tool. It validates input, fetches detailed protein information from the UniProt REST API, extracts relevant pathway data (KEGG/Reactome cross-references and comments), formats it as JSON, and returns it.
    private async handleGetProteinPathways(args: any) {
      if (!isValidProteinInfoArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid protein pathways arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, {
          params: { format: 'json' },
        });
    
        const protein = response.data;
        const pathwayInfo = {
          accession: protein.primaryAccession,
          keggReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'KEGG') || [],
          reactomeReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'Reactome') || [],
          pathwayComments: protein.comments?.filter((c: any) => c.commentType === 'PATHWAY') || [],
          biologicalProcess: protein.comments?.filter((c: any) => c.commentType === 'FUNCTION') || [],
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(pathwayInfo, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching protein pathways: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
  • src/index.ts:559-567 (registration)
    Registration of the 'get_protein_pathways' tool in the list of available tools, including its name, description, and input schema definition.
    name: 'get_protein_pathways',
    description: 'Associated biological pathways (KEGG, Reactome)',
    inputSchema: {
      type: 'object',
      properties: {
        accession: { type: 'string', description: 'UniProt accession number' },
      },
      required: ['accession'],
    },
  • src/index.ts:757-758 (registration)
    Dispatch registration in the CallToolRequestSchema switch statement that routes calls to the handler function.
    case 'get_protein_pathways':
      return this.handleGetProteinPathways(args);
  • Shared input validation helper function used by get_protein_pathways (and other protein info tools) to validate the accession parameter.
    const isValidProteinInfoArgs = (
      args: any
    ): args is { accession: string; format?: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.accession === 'string' &&
        args.accession.length > 0 &&
        (args.format === undefined || ['json', 'tsv', 'fasta', 'xml'].includes(args.format))
      );
    };
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 implies a read-only operation by mentioning retrieval of pathways, but doesn't disclose rate limits, authentication needs, error handling, or output format (e.g., list vs. detailed data). This is inadequate for a tool with zero annotation coverage.

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

Conciseness4/5

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

The description is a single, efficient phrase with no wasted words. It's front-loaded with the core purpose, though it could be more structured (e.g., starting with a verb). Every word earns its place, but it's borderline under-specified rather than concise.

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 no annotations, no output schema, and a single parameter with full schema coverage, the description is incomplete. It doesn't explain what 'associated' means (e.g., direct vs. inferred pathways), the scope of results, or how KEGG/Reactome data is presented. For a biological data tool, this leaves significant gaps.

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%, with the single parameter 'accession' documented as a UniProt accession number. The description adds no additional meaning about the parameter (e.g., format examples, validation rules). Baseline 3 is appropriate since the schema does the heavy lifting.

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

Purpose3/5

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

The description 'Associated biological pathways (KEGG, Reactome)' states what the tool retrieves (pathways) and mentions specific databases, but it lacks a clear verb and doesn't distinguish from siblings like 'get_external_references' or 'search_by_function'. It's vague about whether this is a lookup or search operation.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid accession), exclusions, or how it differs from siblings such as 'get_external_references' or 'search_by_function' that might overlap with 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/UniProt-MCP-Server'

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