Skip to main content
Glama
OMOPHub MCP Server

OMOPHub MCP Server

Official
by OMOPHub

Look up a source concept by vocabulary and code

get_concept_by_code
Read-only

Look up an OMOP concept by vocabulary-specific code and vocabulary ID to resolve ambiguous codes across vocabularies and return matching concepts.

Instructions

Look up an OMOP concept using a vocabulary-specific code and vocabulary ID. Both parameters are required to avoid ambiguity - the same code can exist in multiple vocabularies (e.g., 'E11' exists in both ICD10CM and ICD10). If multiple concepts share the same code within a vocabulary, all matches are returned - prefer the one with standard_concept='S'.

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": {
      "vocabulary_id": "<vocabulary_id>",
      "concept_code": "<concept_code>"
    },
    "name": "get_concept_by_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
concept_codeYesThe vocabulary-specific code. Examples: 'E11.9' (ICD-10), '44054006' (SNOMED), '4850' (LOINC)
vocabulary_idYesThe vocabulary system. Examples: 'ICD10CM', 'SNOMED', 'RxNorm', 'LOINC', 'HCPCS', 'NDC'

Output Schema

NameRequiredDescriptionDefault
conceptsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "concepts": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "concept_id": {
      +            "type": "number"
      +          },
      +          "concept_name": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "concept_id",
      +          "concept_name"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "concepts"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.5.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and closed-world scope, so safety is covered. The description adds genuine behavioral detail beyond that: the same code can exist in multiple vocabularies, and multiple matches within one vocabulary are all returned rather than one being picked.

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 tight sentences: purpose first, then the ambiguity rationale, then the disambiguation rule for multiple matches. The parenthetical example earns its place by concretely demonstrating the collision case rather than restating the schema.

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?

For a two-parameter read-only lookup with full schema coverage, annotations, and an output schema, nothing an agent needs is missing. The description covers the only real pitfalls (wrong vocabulary pairing, multiple matches) and leaves return-value shape to the output schema.

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 the baseline is 3, but the description adds meaning the schema does not: why both parameters are mandatory (cross-vocabulary code collision, with the 'E11' ICD10CM/ICD10 example). The selection rule for standard_concept='S' further guides interpretation of results.

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?

States a specific verb and resource ('Look up an OMOP concept') plus the exact lookup key ('vocabulary-specific code and vocabulary ID'). This cleanly separates it from fuzzy-lookup siblings like search_concepts or semantic_search, which the agent can infer without opening another schema.

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?

Gives clear context for use: you must have both an exact code and its vocabulary, with the rationale that codes are ambiguous across vocabularies. It also advises preferring standard_concept='S' among multiple matches. It never explicitly excludes or names an alternative sibling, so it stops short of a 5.

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