Skip to main content
Glama
OMOPHub MCP Server

OMOPHub MCP Server

Official
by OMOPHub

Map a source concept

map_concept
Read-only

Maps a source vocabulary code or known OMOP concept ID to another vocabulary, such as ICD10CM to SNOMED, and returns verified target mappings.

Instructions

Map a source vocabulary code or a known numeric OMOP concept ID to another vocabulary. For ICD10CM to SNOMED, supply vocabulary_id="ICD10CM", the original concept_code and target_vocabularies="SNOMED". The tool resolves the exact source code before reading its mappings. Report only the targets in successful mappings rows. On error, the mapping is unverified. Follow has_more for further pages.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "map_concept"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number (1-based, default 1)
page_sizeNoMappings per page (1-200, default 100). A concept can have thousands — check has_more in the response and increment page until it is false, otherwise your code list will be incomplete.
concept_idNoKnown numeric source OMOP ID, as an alternative to a vocabulary and code
concept_codeNoOriginal code in the source vocabulary
vocabulary_idNoSource vocabulary for an exact code lookup
on_monthly_limitNoReturn an explicitly partial report if the source lookup succeeds and monthly quota blocks the mapping read. Defaults to an MCP error.
target_vocabulariesNoComma-separated vocabulary IDs to map TO. Examples: 'ICD10CM', 'SNOMED', 'RxNorm'. Omit to see all available mappings.

Output Schema

NameRequiredDescriptionDefault
mappedYesNull when the source was verified but quota prevented checking its mappings.
messageNo
mappingsYes
mapping_errorNo
source_concept_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv1.7.0
    • addedInput schema / properties / concept_code
      Added value: +{
      +  "description": "Original code in the source vocabulary",
      +  "maxLength": 50,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / concept_id / description
      Previous value: -"The source OMOP concept_id to map FROM"New value: +"Known numeric source OMOP ID, as an alternative to a vocabulary and code"
    • addedInput schema / properties / on_monthly_limit
      Added value: +{
      +  "description": "Return an explicitly partial report if the source lookup succeeds and monthly quota blocks the mapping read. Defaults to an MCP error.",
      +  "enum": [
      +    "error",
      +    "return_source"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / page / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[0-9]{1,16}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / page / default
      Removed value: -1
    • removedInput schema / properties / page / minimum
      Removed value: -1
    • removedInput schema / properties / page / type
      Removed value: -"number"
    • addedInput schema / properties / page_size / anyOf
      Added value: +[
      +  {
      +    "maximum": 200,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[0-9]{1,16}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / page_size / default
      Removed value: -100
    • removedInput schema / properties / page_size / maximum
      Removed value: -200
    • removedInput schema / properties / page_size / minimum
      Removed value: -1
    • removedInput schema / properties / page_size / type
      Removed value: -"number"
    • addedInput schema / properties / vocabulary_id
      Added value: +{
      +  "description": "Source vocabulary for an exact code lookup",
      +  "maxLength": 50,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "concept_id"
      -]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "mapped": {
      +      "description": "Null when the source was verified but quota prevented checking its mappings.",
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "mapping_error": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "error_code": {
      +          "const": "MONTHLY_LIMIT_EXCEEDED",
      +          "type": "string"
      +        },
      +        "resets_at": {
      +          "format": "date-time",
      +          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      +          "type": "string"
      +        },
      +        "status": {
      +          "const": 429,
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "error_code"
      +      ],
      +      "type": "object"
      +    },
      +    "mappings": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "relationship_id": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "source_concept_id": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "source_concept_id",
      +    "mapped",
      +    "mappings"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv1.6.0
    • addedInput schema / properties / page
      Added value: +{
      +  "default": 1,
      +  "description": "Page number (1-based, default 1)",
      +  "minimum": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / page_size
      Added value: +{
      +  "default": 100,
      +  "description": "Mappings per page (1-200, default 100). A concept can have thousands — check has_more in the response and increment page until it is false, otherwise your code list will be incomplete.",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "number"
      +}
  3. First observedv1.5.0

TDQS

A3.9/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 openWorldHint=false, so safety is covered. The description still adds real behavior: it resolves the exact source code first, reports only targets in successful mapping rows, treats errors as an unverified mapping rather than a negative result, and warns to follow has_more for pagination. The on_monthly_limit partial-report behavior is left to 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the input-mode distinction and the worked example, then the operational caveats. Every sentence carries information, though 'Report only the targets in successful mappings rows' is grammatically rough and slightly harder to parse than needed.

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?

With an output schema present, return values need not be explained, and the description covers input modes, error semantics and pagination. The one gap is the quota-degradation path (on_monthly_limit), which is only documented in the schema rather than flagged as a behavior of the tool.

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 100%, so baseline is 3. The description restates the two input paths (vocabulary_id plus concept_code, or concept_id) and shows concrete target_vocabularies values, but adds no format or constraint detail beyond what the schema already provides.

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 and resource: 'Map a source vocabulary code or a known numeric OMOP concept ID to another vocabulary', including both accepted input modes. The ICD10CM-to-SNOMED example concretizes it. It does not explicitly contrast with siblings like get_concept_by_code or fhir_resolve_codeable_concept, so an agent must infer the boundary.

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?

Provides a clear usage context: supply vocabulary_id plus concept_code plus target_vocabularies for a specific cross-vocabulary mapping, and omit target_vocabularies to see all mappings. No when-not-to-use guidance or named alternative tools, which keeps it below a 5.

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