Skip to main content
Glama

Resolve HPO Term

resolve_term
Read-onlyIdempotent

Resolve phenotype labels, synonyms, HP IDs, or external CURIEs to the canonical HPO term, including match type and obsolete-term successor; use before get_term for reliable HPO lookups.

Instructions

Resolve a phenotype label, synonym, HP id (HP:0000118), or external cross-reference CURIE (UMLS:C0000737, SNOMEDCT_US:263681008, ...) to the canonical HPO term {hpo_id, name, match_type}. For 2 or more terms, call resolve_terms_batch once instead of calling this tool per item. An ambiguous label returns ambiguous_query with candidates (each {hpo_id, name}); an obsolete HP id resolves with success:true, obsolete:true, and its successor in replaced_by. This is the recommended first step — resolve any query to a canonical HP id before calling get_term. Returns the single best match; text queries add other_matches_count, and to list every term matching a text use search_terms. Signature: resolve_term(query, response_mode=).

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": {
      "query": "<query>"
    },
    "name": "resolve_term"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesA phenotype label, synonym, HP id (HP:0000118), or external xref CURIE (UMLS:C0036572, SNOMEDCT_US:263681008, ...).
response_modeNoVerbosity: minimal|compact|standard|full (default compact).compact

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "properties": {
      -    "_meta": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "allowed_values": {
      -      "type": "array"
      -    },
      -    "candidates": {
      -      "type": "array"
      -    },
      -    "error_code": {
      -      "type": "string"
      -    },
      -    "field": {
      -      "type": "string"
      -    },
      -    "hint": {
      -      "type": "string"
      -    },
      -    "hpo_id": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "hpo_version": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "match_confidence": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "match_type": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "message": {
      -      "type": "string"
      -    },
      -    "name": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "obsolete": {
      -      "type": "boolean"
      -    },
      -    "query": {
      -      "type": "string"
      -    },
      -    "recommended_citation": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "recovery_action": {
      -      "type": "string"
      -    },
      -    "retryable": {
      -      "type": "boolean"
      -    },
      -    "success": {
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  2. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / query / description
      Previous value: -"A phenotype label, synonym, HP id (HP:0000118), or external xref CURIE (UMLS:C0036572, SNOMEDCT_US:193046000, ...)."New value: +"A phenotype label, synonym, HP id (HP:0000118), or external xref CURIE (UMLS:C0036572, SNOMEDCT_US:263681008, ...)."
    • addedOutput schema / properties / match_confidence
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds genuinely new behavior: ambiguous labels return ambiguous_query with candidate objects, and obsolete HP ids resolve with success/obsolete flags plus replaced_by. It also discloses that only the single best match is returned and that text queries carry other_matches_count.

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?

The content is front-loaded with the core purpose and the batch/alternative routing follows immediately. The trailing 'Signature: resolve_term(query, response_mode=)' line and repeated CURIE examples are redundant with the schema, costing a small amount of efficiency.

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 no output schema, the description fully carries the burden by spelling out the success payload and the two edge-case payloads (ambiguous_query, obsolete/replaced_by). For a two-parameter lookup tool this leaves nothing an agent needs unresolved.

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 coverage is 100%, so both parameters are already documented, and the description's parameter discussion largely restates the schema (including the same CURIE examples) in the closing signature line. It adds no new syntax or format guidance beyond what the schema provides, so the baseline 3 applies.

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?

The description opens with a precise verb+resource: resolve a label, synonym, HP id, or xref CURIE to the canonical HPO term, and even names the return shape {hpo_id, name, match_type}. It distinguishes itself from siblings by naming resolve_terms_batch, get_term, and search_terms with the conditions that select each.

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?

Explicit routing is given: use resolve_terms_batch for 2+ terms instead of looping, and 'to list every term matching a text use search_terms'. It also states this is the recommended first step before get_term, so both the alternative and the ordering are unambiguous.

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