Skip to main content
Glama

Get Gene Homologs

ensembl_get_homology
Read-onlyIdempotent

Find orthologs and/or paralogs of a gene across species. Returns each homolog's stable ID, species, homology type (ortholog_one2one, ortholog_one2many, paralog_many2many, etc.), perc_id (percent identity), perc_pos (percent positives), and taxonomy level. Essential for cross-species research — for example, "what is the mouse equivalent of human TP53?" or "how conserved is BRCA2 across mammals?". Provide either symbol + species or a stable gene ID. Target species can be filtered to a single species or left open to return all available homologs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoEnsembl stable gene ID (e.g. ENSG00000139618). Use ensembl_lookup_gene to get the stable ID from a symbol. Cannot be combined with symbol.
typeNoType of homologs to return. orthologues: genes related by speciation (cross-species equivalents). paralogues: genes related by duplication (within or across species). all: both orthologs and paralogs.orthologues
symbolNoGene symbol in the source species (e.g. BRCA2, TP53). Species defaults to homo_sapiens; set species for other organisms. Cannot be combined with id.
speciesNoSource species (the species the query gene belongs to) in Ensembl internal format. Default is homo_sapiens. Use ensembl_list_species to discover valid values.homo_sapiens
max_resultsNoMaximum number of homologs to return. Broad orthology queries (e.g. BRCA2 across all species) can return 150+ homologs; the default keeps responses focused. Set to 0 to return every homolog uncapped. totalCount always reports the true number available before this cap.
target_speciesNoFilter to homologs in a single target species (e.g. mus_musculus for mouse). Omit to return homologs across all available species. Use ensembl_list_species to discover valid values.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe max_results limit applied to the homolog list.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of homologs returned after the max_results cap.
noticeNoGuidance when no homologs are found or the list was capped.
queryIdNoThe resolved Ensembl gene ID used for the homology query.
homologsNoHomologous genes found for the query gene, capped to max_results. totalCount reports the full count available before the cap.
queryTypeNoThe homology type queried (orthologues, paralogues, or all).
truncatedNoTrue when the homolog list was capped at max_results.
totalCountNoTotal number of homologs available before the max_results cap. Exceeds the returned homologs count when the list was capped.
querySpeciesNoThe source species used for the query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / species / minLength
      Added value: +1
  2. 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": [
      +      "homologs",
      +      "totalCount",
      +      "queryId",
      +      "querySpecies",
      +      "queryType"
      +    ]
      +  },
      +  {
      +    "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 gene symbol or stable ID was not found in Ensembl. `no_input`: Neither symbol nor id was provided. `conflicting_input`: Both symbol and id were provided. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "not_found",
      +            "no_input",
      +            "conflicting_input"
      +          ],
      +          "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: -[
      -  "homologs",
      -  "totalCount",
      -  "queryId",
      -  "querySpecies",
      -  "queryType"
      -]
  3. Changed7 schema fields changed
    • addedInput schema / properties / max_results
      Added value: +{
      +  "default": 25,
      +  "description": "Maximum number of homologs to return. Broad orthology queries (e.g. BRCA2 across all species) can return 150+ homologs; the default keeps responses focused. Set to 0 to return every homolog uncapped. totalCount always reports the true number available before this cap.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The max_results limit applied to the homolog list.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / homologs / description
      Previous value: -"Homologous genes found for the query gene."New value: +"Homologous genes found for the query gene, capped to max_results. totalCount reports the full count available before the cap."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no homologs are found."New value: +"Guidance when no homologs are found or the list was capped."
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Number of homologs returned after the max_results cap.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / totalCount / description
      Previous value: -"Total number of homologs returned."New value: +"Total number of homologs available before the max_results cap. Exceeds the returned homologs count when the list was capped."
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when the homolog list was capped at max_results.",
      +  "type": "boolean"
      +}
  4. Changed2 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"Ensembl stable gene ID (e.g. ENSG00000139618). Use ensembl_lookup_gene to get the stable ID from a symbol. Cannot be used together with symbol."New value: +"Ensembl stable gene ID (e.g. ENSG00000139618). Use ensembl_lookup_gene to get the stable ID from a symbol. Cannot be combined with symbol."
    • changedInput schema / properties / symbol / description
      Previous value: -"Gene symbol in the source species (e.g. BRCA2, TP53). Requires species to be set. Cannot be used together with id."New value: +"Gene symbol in the source species (e.g. BRCA2, TP53). Species defaults to homo_sapiens; set species for other organisms. Cannot be combined with id."
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, openWorld, and idempotent hints. The description adds valuable behavioral context beyond this: it details the return fields (stable ID, species, homology type, perc_id, etc.), warns about large result sets (150+ homologs), and clarifies the max_results cap and totalCount reporting. This goes beyond simple read-only disclosure and informs the agent of result volume and cap behavior.

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 concise and well-structured: purpose first, then return details, then usage examples, then input guidance. Every sentence adds information without redundancy. It is appropriately front-loaded and not overlong.

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?

Given the tool's complexity (6 params, output schema present), the description covers purpose, usage scenarios, input flexibility, and filtering options. It fully complements the schema and output schema, including cap behavior and totalCount. An agent can correctly invoke the tool without additional information.

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% and parameter descriptions are detailed, so the baseline is 3. The description adds value by explaining the relationship between id and symbol (mutually exclusive), the default species, and the effect of omitting target_species. It also interprets max_results behavior (cap vs. totalCount), which is not fully inferred from the schema alone.

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 purpose: 'Find orthologs and/or paralogs of a gene across species.' It clearly identifies the verb, resource, and scope, and distinguishes from siblings like ensembl_get_sequence or ensembl_get_xrefs by focusing on homology. The use of examples ('mouse equivalent of human TP53') further clarifies intent.

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?

Provides clear context for when to use the tool (cross-species research, homology queries) and explains the input options (symbol+species or stable ID). It does not explicitly name alternatives or exclusions, but the examples and mention of ensembl_lookup_gene in the schema imply a workflow. Slight deduction for no explicit when-not-to-use guidance.

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.