Skip to main content
Glama
OMOPHub

OMOPHub MCP Server

Official
by OMOPHub

get_hierarchy

Navigate the OMOP vocabulary hierarchy to find ancestor or descendant concepts, supporting phenotype definition and concept set building.

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 500). 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
concept_idYesThe OMOP concept_id
directionNoHierarchy direction: 'up' for ancestors, 'down' for descendants, 'both' for full context (default: 'both')both
max_levelsNoMaximum levels to traverse (default 5 for 'up', 10 for 'down', 5/3 for 'both')
max_resultsNoMaximum number of nodes to return (1-500, default 500). 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 full burden. It reveals that results are capped at max_results (default 500), indicates truncation with total count, and documents default max_levels per direction. It does not explicitly state read-only behavior, but the verb 'navigate' implies no modification.

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?

The description is three sentences, front-loading the main purpose, then providing examples and constraints. Every sentence adds essential information without redundancy or fluff.

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

Completeness3/5

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

Given no output schema, the description should cover return structure. It mentions truncation indication but does not describe the response format (e.g., tree, flat list, node properties). This gap prevents full understanding of output, though usage and constraints are well covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 adds significant value by explaining direction with real-world examples, clarifying default max_levels, and detailing truncation handling strategy. This goes well beyond the schema's parameter descriptions.

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 clearly states the tool's purpose: 'Navigate the vocabulary hierarchy for a concept.' It specifies three direction options with examples ('up' for ancestors like 'Diabetes mellitus' → 'Metabolic disease', 'down' for descendants) and differentiates from siblings by focusing on hierarchy traversal, which no other sibling explicitly handles.

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?

The description provides clear guidance on when to use each direction ('up' for ancestors, 'down' for descendants, 'both' for full context) and mentions handling truncation with max_results or vocabulary_ids. However, it does not explicitly state when not to use this tool or suggest alternatives.

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