Skip to main content
Glama
OMOPHub MCP Server

OMOPHub MCP Server

Official
by OMOPHub

Resolve a FHIR CodeableConcept

fhir_resolve_codeable_concept
Read-only

Resolves a FHIR CodeableConcept to an OMOP concept by selecting the best coding per OHDSI vocabulary preference, with semantic text fallback when no coding matches.

Instructions

Resolve a FHIR CodeableConcept with multiple codings. Picks the best match per OHDSI vocabulary preference (SNOMED > RxNorm > LOINC > CVX > ICD-10). Falls back to the text field via semantic search if no coding resolves.

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": {
      "coding": "<coding>"
    },
    "name": "fhir_resolve_codeable_concept"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoCodeableConcept.text — semantic fallback if no coding resolves
codingYesArray of FHIR Coding entries from the CodeableConcept
on_unmappedNoBehavior when nothing resolves: 'error' (default, 404) or 'sentinel' (concept_id 0 record)
resource_typeNoFHIR resource type
include_qualityNo
include_recommendationsNo

Output Schema

NameRequiredDescriptionDefault
dataNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.7.0
    • addedInput schema / properties / coding / items / properties / code / maxLength
      Added value: +500
    • addedInput schema / properties / coding / items / properties / display / maxLength
      Added value: +500
    • addedInput schema / properties / coding / items / properties / system / maxLength
      Added value: +500
    • addedInput schema / properties / resource_type / maxLength
      Added value: +500
    • addedInput schema / properties / text / maxLength
      Added value: +500
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "data": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.5.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish read-only, non-destructive, closed-world behavior, and the description adds genuinely non-obvious behavior: a deterministic preference ranking (SNOMED > RxNorm > LOINC > CVX > ICD-10) and an automatic semantic-search fallback to the text field. It does not disclose the failure path, even though the schema exposes an on_unmapped choice between a 404 error and a sentinel concept_id 0 record, which is the riskiest behavior for a caller to get wrong.

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?

Three short sentences, front-loaded with the resource and immediately followed by the resolution strategy; there is no filler. Minor redundancy in restating 'CodeableConcept' and the parenthetical system list is dense but earns its place.

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?

An output schema exists, so return values need no explanation, and the description covers the core resolution and fallback path adequately for a 6-parameter tool. The remaining gap is the unmapped-outcome contract (default 404 vs sentinel record) and the quality/recommendation flags, which a caller choosing arguments would want stated.

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 description coverage is 67%, so the baseline is a 3. The description explains the two parameters that matter most semantically — the coding array and the text fallback — but says nothing about resource_type, include_quality, include_recommendations, or the error-vs-sentinel tradeoff, leaving a third of the surface undocumented in both places.

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?

States a specific verb (resolve) and resource (FHIR CodeableConcept) plus the discriminating condition 'with multiple codings', so an agent knows this is the multi-coding path rather than a single-code lookup. It does not explicitly name or rule out the sibling fhir_resolve, so differentiation from that close neighbor is left implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description conveys the internal decision logic (vocabulary preference order, text fallback) which implies when the tool is appropriate, but it never states when to prefer a sibling such as get_concept_by_code or fhir_resolve, nor any preconditions or exclusions. Usage is inferable rather than instructed.

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