Skip to main content
Glama

Get a trait by ontology ID

get_trait
Read-only

Retrieve a trait's details by ontology ID—label, description, synonyms, mapped terms, categories, linked PGS IDs, and optional child terms—to resolve phenotypes for PGS analysis.

Instructions

Retrieve one trait by ontology ID (e.g. MONDO_0004989): label, description, synonyms, external mapped terms, trait categories, and the PGS IDs associated with it (and optionally its child terms).

Input Schema

NameRequiredDescriptionDefault
fullNoReturn the complete upstream record including every field. Verbose; use only when the compact projection is not enough.
fieldsNoOptional comma-separated list of fields to return (dotted paths allowed, e.g. 'id,trait_reported,publication.title'). Omit for the default compact projection.
trait_idYesOntology trait ID exactly as returned by search_traits, e.g. MONDO_0004989, EFO_0004337, HP_0000001.
include_childrenNoInclude the child terms of this trait. Defaults to true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this as a read-only/open-world operation, and the description adds useful behavioral context by listing returned content and noting optional child-term inclusion. It does not cover rate limits or auth needs, but those are less critical for this read-only lookup.

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?

It is a single front-loaded sentence that states the action and enumerates the returned fields without wasted preamble. The structure is appropriate for a lookup tool.

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?

Given the read-only annotations, 100% schema coverage, and absence of an output schema, the description is mostly complete: it names the key returned fields and child-term behavior. Minor details such as compact-projection vs full/fields behavior are left to the schema, which is acceptable.

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 parameter meaning is already well documented. The description adds an example trait ID and mentions child terms, but it does not explain the full or fields controls, so it does not add much beyond the schema's own high coverage.

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 uses a specific verb and resource: retrieve one trait by ontology ID. The scope is clearly single-trait lookup, which distinguishes it from search_traits and list_trait_categories, and it previews the returned content.

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

Usage Guidelines3/5

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

The phrase 'by ontology ID' implies the tool is for when an ID is already known, but the description does not explicitly say when to use this versus search_traits or other trait tools. The schema helps by noting trait_id is as returned by search_traits, but the description itself only implies usage.

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