Skip to main content
Glama

Get Cross-Database References

ensembl_get_xrefs
Read-onlyIdempotent

Retrieve cross-database references for a gene or feature — HGNC, UniProt, EntrezGene, OMIM, RefSeq, Reactome, and others. Returns each xref with its database name, primary ID, display ID, and description, plus how Ensembl assigned it (infoType, infoText) and its evidence codes (linkageTypes, such as GO evidence codes) when supplied. By default only the requested object level is queried; all_levels=true includes transcript and translation references for a gene. The dbname filter narrows this scope. IDs returned here chain onward: a Uniprot/SWISSPROT accession to UniProt (protein function) and PubChem (bioassays against the protein), MIM_GENE to OMIM (disease), Reactome_gene and Reactome to Reactome (pathways), and PDB to structure sources. Requires an Ensembl stable ID — use ensembl_lookup_gene to get the ENSG… ID first. Common dbname values: HGNC, Uniprot_gn, Uniprot/SWISSPROT (reviewed UniProt accession, held on the translation: use all_levels=true from a gene or transcript), EntrezGene, MIM_GENE, RefSeq_mRNA, RefSeq_peptide, Reactome_gene (gene pathways), Reactome (translation pathways), GO (Gene Ontology), ChEMBL.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "ensembl_get_xrefs"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesEnsembl stable gene (ENSG…), transcript (ENST…), or translation (ENSP…) ID. A version suffix on an ENS… or LRG ID (ENSG00000139618.17, LRG_1t1.1) is dropped before the request. Use ensembl_lookup_gene to get the stable ID from a gene symbol. References default to this object level; all_levels=true includes child objects.
dbnameNoFilter to a specific external database by its Ensembl internal name. Examples: HGNC (HGNC gene ID), Uniprot_gn (UniProt gene name), Uniprot/SWISSPROT (reviewed UniProt accession, on the translation), EntrezGene (NCBI Gene ID), MIM_GENE (OMIM disease gene), RefSeq_mRNA (NCBI RefSeq transcript), Reactome_gene (gene pathways), Reactome (translation pathways), GO (Gene Ontology terms). Transcript/translation references may require all_levels=true or the specific feature ID. Omit to return every database within the selected scope.
all_levelsNoInclude references on child objects: a gene includes its transcripts and translations. Default false queries only the requested object level, independently of dbname.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
xrefsNoCross-database references for the queried Ensembl ID.
noticeNoGuidance when no cross-references are found.
queriedIdNoThe Ensembl stable ID as submitted, including any version suffix.
totalCountNoTotal number of cross-references returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / id / description
      Previous value: -"Ensembl stable gene (ENSG…), transcript (ENST…), or translation (ENSP…) ID. A version suffix on an ENS… ID (ENSG00000139618.17) is dropped before the request. Use ensembl_lookup_gene to get the stable ID from a gene symbol. References default to this object level; all_levels=true includes child objects."New value: +"Ensembl stable gene (ENSG…), transcript (ENST…), or translation (ENSP…) ID. A version suffix on an ENS… or LRG ID (ENSG00000139618.17, LRG_1t1.1) is dropped before the request. Use ensembl_lookup_gene to get the stable ID from a gene symbol. References default to this object level; all_levels=true includes child objects."
  2. Changed5 schema fields changed
    • changedInput schema / properties / dbname / description
      Previous value: -"Filter to a specific external database by its Ensembl internal name. Examples: HGNC (HGNC gene ID), Uniprot_gn (UniProt gene name), EntrezGene (NCBI Gene ID), MIM_GENE (OMIM disease gene), RefSeq_mRNA (NCBI RefSeq transcript), Reactome_gene (gene pathways), Reactome (translation pathways), GO (Gene Ontology terms). Transcript/translation references may require all_levels=true or the specific feature ID. Omit to return every database within the selected scope."New value: +"Filter to a specific external database by its Ensembl internal name. Examples: HGNC (HGNC gene ID), Uniprot_gn (UniProt gene name), Uniprot/SWISSPROT (reviewed UniProt accession, on the translation), EntrezGene (NCBI Gene ID), MIM_GENE (OMIM disease gene), RefSeq_mRNA (NCBI RefSeq transcript), Reactome_gene (gene pathways), Reactome (translation pathways), GO (Gene Ontology terms). Transcript/translation references may require all_levels=true or the specific feature ID. Omit to return every database within the selected scope."
    • changedOutput schema / properties / xrefs / items / properties / dbname / description
      Previous value: -"Database name in Ensembl internal format (e.g. HGNC, Uniprot_gn, EntrezGene, MIM_GENE, RefSeq_mRNA)."New value: +"Database name in Ensembl internal format (e.g. HGNC, Uniprot_gn, Uniprot/SWISSPROT, EntrezGene, MIM_GENE, RefSeq_mRNA)."
    • addedOutput schema / properties / xrefs / items / properties / infoText
      Added value: +{
      +  "description": "Detail Ensembl records for the assignment: its source (e.g. UniProt, GO_Central) or, for a projection, the ortholog it came from. Omitted when blank.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / xrefs / items / properties / infoType
      Added value: +{
      +  "description": "How Ensembl assigned the reference, e.g. DIRECT (from the external database), DEPENDENT (derived from another reference), PROJECTION (projected from an ortholog), SEQUENCE_MATCH, CHECKSUM.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / xrefs / items / properties / linkageTypes
      Added value: +{
      +  "description": "Evidence codes supporting the reference — GO evidence codes on GO terms (e.g. IDA experimental, IEA electronic, ISS sequence similarity). Omitted when Ensembl lists none.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Changed4 schema fields changed
    • addedInput schema / properties / all_levels
      Added value: +{
      +  "default": false,
      +  "description": "Include references on child objects: a gene includes its transcripts and translations. Default false queries only the requested object level, independently of dbname.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / dbname / description
      Previous value: -"Filter to a specific external database by its Ensembl internal name. Examples: HGNC (HGNC gene ID), Uniprot_gn (UniProt gene name), EntrezGene (NCBI Gene ID), MIM_GENE (OMIM disease gene), RefSeq_mRNA (NCBI RefSeq transcript), Reactome (pathway IDs), GO (Gene Ontology terms). Omit to return all available xrefs."New value: +"Filter to a specific external database by its Ensembl internal name. Examples: HGNC (HGNC gene ID), Uniprot_gn (UniProt gene name), EntrezGene (NCBI Gene ID), MIM_GENE (OMIM disease gene), RefSeq_mRNA (NCBI RefSeq transcript), Reactome_gene (gene pathways), Reactome (translation pathways), GO (Gene Ontology terms). Transcript/translation references may require all_levels=true or the specific feature ID. Omit to return every database within the selected scope."
    • changedInput schema / properties / id / description
      Previous value: -"Ensembl stable gene ID (ENSG…) or transcript ID (ENST…). A version suffix on an ENS… ID (ENSG00000139618.17) is dropped before the request. Use ensembl_lookup_gene to get the stable ID from a gene symbol. xrefs/id returns the full cross-reference set (56+ entries for well-annotated genes like BRCA2)."New value: +"Ensembl stable gene (ENSG…), transcript (ENST…), or translation (ENSP…) ID. A version suffix on an ENS… ID (ENSG00000139618.17) is dropped before the request. Use ensembl_lookup_gene to get the stable ID from a gene symbol. References default to this object level; all_levels=true includes child objects."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `not_found`: The Ensembl stable ID was not found or has no cross-references. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `not_found`: The Ensembl stable ID was not found. An empty cross-reference list remains successful. Other values are possible when a failure originates below the handler."
  4. Changed2 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"Ensembl stable gene ID (ENSG…) or transcript ID (ENST…). Use ensembl_lookup_gene to get the stable ID from a gene symbol. xrefs/id returns the full cross-reference set (56+ entries for well-annotated genes like BRCA2)."New value: +"Ensembl stable gene ID (ENSG…) or transcript ID (ENST…). A version suffix on an ENS… ID (ENSG00000139618.17) is dropped before the request. Use ensembl_lookup_gene to get the stable ID from a gene symbol. xrefs/id returns the full cross-reference set (56+ entries for well-annotated genes like BRCA2)."
    • changedOutput schema / properties / queriedId / description
      Previous value: -"The Ensembl stable ID that was queried."New value: +"The Ensembl stable ID as submitted, including any version suffix."
  5. Changed1 schema field changed
    • addedInput schema / properties / id / minLength
      Added value: +1
  6. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "xrefs",
      +      "totalCount",
      +      "queriedId"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `not_found`: The Ensembl stable ID was not found or has no cross-references. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "not_found"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "xrefs",
      -  "totalCount",
      -  "queriedId"
      -]
  7. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and openWorld, so the safety profile is covered; the description adds the non-obvious scope default ('By default only the requested object level is queried') and the interaction between dbname and all_levels. It also explains what downstream IDs can chain to (UniProt, OMIM, Reactome, PDB), which is genuinely useful behavioral context. Some of the return-field enumeration duplicates what the output schema likely documents.

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?

Front-loaded with purpose and return shape, then scope defaults, then chaining, then the prerequisite. It is dense and mostly earns its length, though the long 'Common dbname values' tail repeats examples already present in the dbname schema field.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, annotations covering the safety profile, and 100% schema description coverage, the remaining burden is usage context — prerequisites, scope defaults, and how results chain — all of which the description supplies.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds value by framing dbname values in terms of what each reference can chain onward to (disease, pathways, bioassays) and by flagging that Uniprot/SWISSPROT lives on the translation and needs all_levels=true. It largely mirrors the schema's own examples, which keeps it from a 5.

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

Purpose5/5

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

States a specific verb and resource ('Retrieve cross-database references for a gene or feature') and immediately enumerates the reference types covered (HGNC, UniProt, EntrezGene, OMIM, RefSeq, Reactome), which clearly separates it from siblings like ensembl_get_sequence or ensembl_get_homology.

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

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the prerequisite path — 'Requires an Ensembl stable ID — use ensembl_lookup_gene to get the ENSG… ID first' — and gives the condition for all_levels=true (transcript/translation references such as Uniprot/SWISSPROT). It does not state when this tool should be avoided in favor of an alternative, so it falls short of full when/when-not coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.