Skip to main content
Glama

Get Trait

get_trait
Read-only

Retrieve a trait’s label, synonyms, categories, description, score counts, and first 50 polygenic score IDs by trait ID; optionally include descendant traits and their scores.

Instructions

Return one trait: label, synonyms, categories, description, score counts and the first 50 PGS IDs mapped to it (pgs_ids_truncated says if there are more: page them with search_scores(trait_id)); include_children adds descendant traits and their score IDs. An unknown or retired ID is not_found. Signature: get_trait(trait_id, include_children=).

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": {
      "trait_id": "<trait_id>"
    },
    "name": "get_trait"
  }
}

Input Schema

NameRequiredDescriptionDefault
trait_idYesTrait ontology ID as the catalog writes it (MONDO_0004989, EFO_0001645, HP_0000822). Get it from resolve_trait; old EFO IDs migrated to MONDO are not_found.
include_childrenNoAlso list descendant traits and their scores.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.1/5.0
Behavior5/5

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

Beyond readOnlyHint and openWorldHint, the description discloses the 50-item truncation cap, the pgs_ids_truncated flag that signals more results, the exact pagination route, and the not_found outcome for unknown or retired IDs. That is genuine behavioral context an agent could not get from annotations alone.

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 return-field inventory is front-loaded and the pagination and not_found notes follow logically. The trailing 'Signature: get_trait(trait_id, include_children=)' restates the schema and is the one line that does not earn its place.

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 enumerates the returned fields, explains truncation and how to fetch the rest, and covers the error case. Nothing an agent needs in order to call this 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 coverage is 100%, so both parameters are already documented. The description adds a little meaning (include_children yields descendant traits and their score IDs), but the trait_id format and MONDO/EFO/HP semantics are already in the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Return one trait') and enumerates the returned fields (label, synonyms, categories, description, score counts, PGS IDs), so the agent knows exactly what it gets. It does not explicitly contrast with siblings like get_score or resolve_trait, which keeps it short of a 5.

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?

It gives actionable conditional guidance: when pgs_ids_truncated is true, page results with search_scores(trait_id), and include_children is the switch for descendant traits. It stops short of saying when to prefer this over get_score or search_scores for other purposes, so no explicit exclusions.

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