Skip to main content
Glama

Get HPO Term

get_term
Read-onlyIdempotent

Retrieve full HPO phenotype term records by HP id, label, synonym, or external xref, including definitions, synonyms, cross-references, parents, children, and obsolescence details.

Instructions

Return an HPO phenotype term record: definition, synonyms (exact/related/broad/narrow), alt_ids, subsets, comments, cross-references, direct parents and children, and obsolescence (replaced_by). The term accepts an HP id, a label/synonym, or an external xref CURIE (resolved first). For only the labels of several HP ids, call resolve_terms_batch once. Pass fields=['synonyms', 'definition'] for a sparse projection. Note on synonyms shape: compact (default) returns synonyms as plain strings; standard/full return {text, scope} objects. Signature: get_term(hpo_id, response_mode=, fields=).

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": {
      "hpo_id": "<hpo_id>"
    },
    "name": "get_term"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsNoSparse fieldset: return ONLY these top-level keys (for map_cross_ontology, dot into the grouped object, e.g. 'mappings.UMLS'). Identity anchors (hpo_id, name, hpo_version) are always included. An unrecognised field is rejected with invalid_input. Omit for the full payload.
hpo_idYesCanonical HP id for the resolved HPO term (HP:0000118). Legacy `term` arguments are accepted as an alias.
response_modeNoVerbosity: minimal|compact|standard|full (default compact).compact

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.0
    • changedInput schema / properties / fields / description
      Previous value: -"Sparse fieldset: return ONLY these top-level keys (dot into a grouped object, e.g. 'xrefs.UMLS'). Identity anchors (hpo_id, name, hpo_version) are always included. Omit for the full payload."New value: +"Sparse fieldset: return ONLY these top-level keys (for map_cross_ontology, dot into the grouped object, e.g. 'mappings.UMLS'). Identity anchors (hpo_id, name, hpo_version) are always included. An unrecognised field is rejected with invalid_input. Omit for the full payload."
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "properties": {
      -    "_meta": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "allowed_values": {
      -      "type": "array"
      -    },
      -    "alt_ids": {
      -      "type": "array"
      -    },
      -    "candidates": {
      -      "type": "array"
      -    },
      -    "children": {
      -      "type": "array"
      -    },
      -    "comments": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "kind": {
      -            "const": "untrusted_text"
      -          },
      -          "provenance": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "record_id": {
      -                "type": "string"
      -              },
      -              "retrieved_at": {
      -                "type": "string"
      -              },
      -              "source": {
      -                "type": "string"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          "raw_sha256": {
      -            "type": "string"
      -          },
      -          "text": {
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "definition": {
      -      "oneOf": [
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "kind": {
      -              "const": "untrusted_text"
      -            },
      -            "provenance": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "record_id": {
      -                  "type": "string"
      -                },
      -                "retrieved_at": {
      -                  "type": "string"
      -                },
      -                "source": {
      -                  "type": "string"
      -                }
      -              },
      -              "type": "object"
      -            },
      -            "raw_sha256": {
      -              "type": "string"
      -            },
      -            "text": {
      -              "type": "string"
      -            }
      -          },
      -          "type": "object"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "error_code": {
      -      "type": "string"
      -    },
      -    "field": {
      -      "type": "string"
      -    },
      -    "hint": {
      -      "type": "string"
      -    },
      -    "hpo_id": {
      -      "type": "string"
      -    },
      -    "hpo_version": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "message": {
      -      "type": "string"
      -    },
      -    "name": {
      -      "type": "string"
      -    },
      -    "obsolete": {
      -      "type": "boolean"
      -    },
      -    "parents": {
      -      "type": "array"
      -    },
      -    "recommended_citation": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "recovery_action": {
      -      "type": "string"
      -    },
      -    "retryable": {
      -      "type": "boolean"
      -    },
      -    "subsets": {
      -      "type": "array"
      -    },
      -    "success": {
      -      "type": "boolean"
      -    },
      -    "synonyms": {
      -      "items": {
      -        "oneOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "additionalProperties": true,
      -            "properties": {
      -              "scope": {
      -                "type": "string"
      -              },
      -              "text": {
      -                "type": "string"
      -              }
      -            },
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  2. Changed3 schema fields changedv0.3.0
    • addedOutput schema / properties / comments
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "untrusted_text"
      +      },
      +      "provenance": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "record_id": {
      +            "type": "string"
      +          },
      +          "retrieved_at": {
      +            "type": "string"
      +          },
      +          "source": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "raw_sha256": {
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / definition / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "untrusted_text"
      +      },
      +      "provenance": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "record_id": {
      +            "type": "string"
      +          },
      +          "retrieved_at": {
      +            "type": "string"
      +          },
      +          "source": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "raw_sha256": {
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / definition / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
  3. Changed4 schema fields changedv0.1.1
    • addedInput schema / properties / hpo_id
      Added value: +{
      +  "description": "Canonical HP id for the resolved HPO term (HP:0000118). Legacy `term` arguments are accepted as an alias.",
      +  "examples": [
      +    "HP:0000118"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / term
      Removed value: -{
      -  "description": "An HP id (HP:0000118), a phenotype label/synonym, or an external xref CURIE that resolves to a single HPO term.",
      -  "examples": [
      -    "HP:0000118",
      -    "Seizure",
      -    "UMLS:C0036572"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "term"
      -]New value: +[
      +  "hpo_id"
      +]
    • addedOutput schema / properties / synonyms / items
      Added value: +{
      +  "oneOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": true,
      +      "properties": {
      +        "scope": {
      +          "type": "string"
      +        },
      +        "text": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  ]
      +}
  4. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), but the description adds real behavior: argument resolution order (label/synonym/xref CURIE is resolved first), the fact that invalid sparse fields are rejected, and that synonym output shape changes with response_mode. It does not explain what 'minimal' vs 'standard' vs 'full' actually add beyond the synonyms shape change, which is the main remaining gap.

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-loads the returned payload, then usage routing, then a shape caveat, then the signature — a sensible order with no filler sentences. It is dense but slightly over-packed, and the trailing 'Signature: get_term(hpo_id, response_mode=, fields=)' line largely restates what the schema already encodes.

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

Completeness4/5

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

With no output schema, the description carries the burden of describing returns, and it does so by listing the record's keys and flagging the synonyms shape variance. The only shortfall is that the four response_mode levels are named but not characterized, leaving an agent to guess what 'standard' or 'full' add.

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, but the description earns more by explaining that hpo_id accepts labels, synonyms, or external xref CURIEs (resolved first) — a resolution behavior the schema's 'Canonical HP id' wording implies but does not state. The note that compact returns synonym strings while standard/full return {text, scope} objects adds semantics the terse enum description lacks.

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 ('Return an HPO phenotype term record') and enumerates the payload a caller gets: definition, synonyms with scope types, alt_ids, subsets, comments, xrefs, parents/children, and obsolescence. It also names the sibling used for a different job ('For only the labels of several HP ids, call resolve_terms_batch'), so the agent can discriminate without opening schemas.

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?

Gives a concrete routing rule to resolve_terms_batch for the labels-of-many-ids case and shows when to use the sparse projection ('Pass fields=[...] for a sparse projection'). It does not address how this differs from the singular sibling resolve_term or when to prefer the dedicated get_term_parents/children tools, so it stops short of full exclusion guidance.

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