Skip to main content
Glama
OMOPHub

OMOPHub MCP Server

Official
by OMOPHub

get_hierarchy

Traverse OMOP concept hierarchies upward or downward to discover broader or narrower terms. Use descendants to build complete concept sets for phenotype definitions.

Instructions

Navigate the vocabulary hierarchy for a concept. Use direction='up' for ancestors (broader terms like 'Diabetes mellitus' → 'Metabolic disease'), direction='down' for descendants (narrower terms, essential for building concept sets in phenotype definitions), or direction='both' for full hierarchical context. Results are capped at max_results nodes (default 200). If truncated, the response will indicate total available count so you can narrow with vocabulary_ids or reduce max_levels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionNoHierarchy direction: 'up' for ancestors, 'down' for descendants, 'both' for full context (default: 'both')both
concept_idYesThe OMOP concept_id
max_levelsNoMaximum levels to traverse (default 5 for 'up', 10 for 'down', 5/3 for 'both')
max_resultsNoMaximum number of nodes to return (1-200, default 200). Use a smaller value for broad concepts.
vocabulary_idsNoComma-separated vocabulary IDs to filter results. Leave empty for all.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses result capping ('capped at max_results nodes default 200'), truncation behavior ('If truncated, the response will indicate total available count'), and provides remediation guidance ('narrow with vocabulary_ids or reduce max_levels'). This adds behavioral context beyond the schema.

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?

Three sentences, front-loaded with the core purpose, each sentence adds meaningful guidance. No filler.

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?

The description covers direction semantics, result limits, truncation handling, and narrowing strategies. While it lacks explicit return-structure details, the absence of an output schema is partially mitigated by the phrase 'Results are capped at max_results nodes', implying a list of nodes. Overall sufficient for a 5-param hierarchy tool.

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 baseline is 3. The description enriches parameters by providing real-world examples for direction, explaining the purpose of 'down' for concept sets, and explaining the interplay between max_results, vocabulary_ids, and max_levels for dealing with truncation.

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 ('navigate') and resource ('vocabulary hierarchy for a concept') with concrete examples (e.g., 'Diabetes mellitus' → 'Metabolic disease'). This clearly distinguishes it from sibling tools like search_concepts or get_concept.

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 explicitly instructs when to use each direction value ('direction=''up'' for ancestors... down for descendants... both for full context') and highlights a key use case ('essential for building concept sets in phenotype definitions'). It does not explicitly name alternative tools, but the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OMOPHub/omophub-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server