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.

Input Schema

NameRequiredDescriptionDefault
idYesEnsembl 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.
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. 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"
      +}
  2. 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."
  3. 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."
  4. Changed1 schema field changed
    • addedInput schema / properties / id / minLength
      Added value: +1
  5. 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"
      -]
  6. 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/openWorld/idempotent, so the safety profile is covered; the description adds the non-obvious behavioral rule that queries are scoped to the requested object level by default and that dbname does not implicitly widen that scope. It also discloses the shape of each xref record (infoType, infoText, linkageTypes) and that evidence codes appear only when supplied. Slight over-investment in describing return fields that an output schema already covers keeps it from a 5.

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 rules, then the chaining map — a sensible ordering. It is dense and every clause carries information, but the two long enumerations of dbname values duplicate the schema and could be trimmed without loss.

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?

Covers purpose, precondition, scope defaults, filtering, evidence-code caveats, and the cross-database chaining graph that lets an agent decide which xrefs to fetch next. Combined with a rich input schema, annotations, and an output schema, nothing needed to invoke it correctly is missing.

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%, so the schema already documents id, dbname, and all_levels thoroughly — including the same list of database examples the description repeats. The description's genuine additions are the downstream chaining guidance (MIM_GENE to OMIM, PDB to structure, etc.) and the note that the reviewed UniProt accession sits on the translation. Baseline 3 given heavy overlap with the schema text.

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 database families returned, so an agent knows exactly what class of data this yields versus ensembl_get_sequence or ensembl_get_homology. It also names the prerequisite sibling, ensembl_lookup_gene, making the boundary explicit.

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

Usage Guidelines5/5

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

Explicitly states the precondition ('Requires an Ensembl stable ID — use ensembl_lookup_gene to get the ENSG… ID first'), explains the default object-level scope versus all_levels=true, and tells the agent precisely when all_levels is needed (Uniprot/SWISSPROT is held on the translation). It also gives the onward-chaining use cases that motivate choosing a given dbname.

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.