Skip to main content
Glama
OMOPHub

OMOPHub MCP Server

Official
by OMOPHub

get_hierarchy

Navigate the vocabulary hierarchy for a medical concept to find broader ancestors or narrower descendants, essential for building phenotype concept sets.

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 provided, the description carries the full burden. It discloses truncation behavior (capped at max_results, with total count available) and suggests narrowing strategies. It does not cover auth needs or rate limits, but those are not critical for this read-only operation. The description is transparent about the main behavioral aspect.

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 concise (three sentences) and front-loaded with the primary purpose. Each sentence contributes essential information without redundancy or fluff.

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 5 parameters and no output schema, the description covers the tool's purpose, direction use cases, truncation behavior, and parameter hints. It does not detail the return format, but mentions the truncation indication. This is sufficient for an agent to use the tool effectively.

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 adds value by explaining direction with examples, providing defaults for max_levels per direction, and advising on max_results for broad concepts. This goes beyond the schema's basic 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 the three direction options and their use cases (ancestors, descendants, full context) with concrete examples, distinguishing 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?

The description provides explicit guidance on when to use each direction, including an example and a note that descendants are essential for building concept sets. It does not explicitly mention when not to use this tool or list alternatives, but the context is clear and helpful.

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