Skip to main content
Glama

get_external_references

Retrieve cross-references from UniProt entries to external databases like PDB, EMBL, and RefSeq by providing an accession number.

Instructions

Links to other databases (PDB, EMBL, RefSeq, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number

Implementation Reference

  • The handler function for the 'get_external_references' tool. It validates the accession input, fetches the UniProtKB entry via API, extracts cross-references (uniProtKBCrossReferences), categorizes them by database (PDB, EMBL, RefSeq, Ensembl, GO), and returns structured JSON.
    private async handleGetExternalReferences(args: any) {
      if (!isValidProteinInfoArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid external references arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, {
          params: { format: 'json' },
        });
    
        const protein = response.data;
        const externalRefs = {
          accession: protein.primaryAccession,
          allReferences: protein.uniProtKBCrossReferences || [],
          pdbReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'PDB') || [],
          emblReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'EMBL') || [],
          refseqReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'RefSeq') || [],
          ensemblReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'Ensembl') || [],
          goReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'GO') || [],
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(externalRefs, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching external references: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:774-775 (registration)
    Registers and dispatches the 'get_external_references' tool call to its handler within the CallToolRequestSchema switch statement.
      return this.handleGetExternalReferences(args);
    case 'get_literature_references':
  • Tool metadata and input schema definition returned by ListToolsRequestSchema, specifying the name, description, and required 'accession' parameter.
      name: 'get_external_references',
      description: 'Links to other databases (PDB, EMBL, RefSeq, etc.)',
      inputSchema: {
        type: 'object',
        properties: {
          accession: { type: 'string', description: 'UniProt accession number' },
        },
        required: ['accession'],
      },
    },
  • Input validation helper function used by the get_external_references handler to validate the accession argument.
    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))
      );
    };
Behavior1/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. However, it only lists database names without explaining what the tool does (e.g., returns URLs, IDs, or metadata), any rate limits, authentication needs, or output format. This leaves the agent guessing about the tool's behavior, warranting a score of 1.

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

Conciseness3/5

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

The description is a single, concise phrase, but it is under-specified rather than efficiently informative. It lacks front-loaded clarity (e.g., starting with a verb like 'Retrieve') and wastes space on generic examples ('PDB, EMBL, RefSeq, etc.') without adding actionable context. A score of 3 reflects this balance between brevity and insufficient detail.

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 tool's complexity (a read operation with one parameter) and the absence of annotations and output schema, the description is incomplete. It does not explain what the tool returns (e.g., links, identifiers, or metadata), leaving gaps in understanding its functionality. While the schema covers the parameter, the overall context is inadequate, scoring 2.

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 'accession' parameter clearly documented as a 'UniProt accession number'. The description adds no additional meaning about parameters, such as format examples or constraints. According to the rules, with high schema coverage (>80%), the baseline is 3 even without param info in the description, so this score is appropriate.

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

Purpose2/5

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

The description 'Links to other databases (PDB, EMBL, RefSeq, etc.)' is vague and tautological—it essentially restates the tool name 'get_external_references' without specifying the action (e.g., 'retrieve' or 'fetch') or the resource (e.g., 'for a given protein'). It does not clearly distinguish this tool from siblings like 'get_protein_info' or 'get_protein_sequence', which might also involve external data. A score of 2 reflects this lack of specificity and differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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 does not mention any context, prerequisites, or exclusions, such as when to prefer this over 'get_protein_info' (which might include references) or 'search_by_function'. With no implied or explicit usage instructions, this is a minimal score of 1.

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