Skip to main content
Glama

Map Medical Codes

medcode_map_codes
Read-onlyIdempotent

Crosswalk a US medical code or drug across systems and within a hierarchy. Hierarchy directions: parents and children walk a code's hierarchy one level per call — immediate parent/children only (depth-1); call iteratively for the full ancestor or descendant path. ICD-10-CM and HCPCS walk the prefix hierarchy, stepping past an ICD-10-CM level padded with the placeholder X that is not itself a code (the parent of S82.66XA is S82.66); an ICD-10-PCS three-character table row's children are the complete codes that begin with it, and a complete code's parent is its table row; RxNorm concepts have no code hierarchy. A resolvable source with no edge in the requested direction is a successful empty result with a notice, not an error. A source code string that also exists in another bundled system carries alsoInSystems naming it, since only the resolved system's hierarchy was walked. Drug directions (RxNorm): name_to_rxcui (drug name → RXCUI; one name matches ingredients, combinations, and products alike, each hit tagged with its conceptType), ndc_to_rxcui and rxcui_to_ndc (NDC ↔ RXCUI; NDCs accepted hyphenated in an FDA segment configuration — 4-4-2, 5-3-2, 5-4-1, or the 11-digit 5-4-2 — or as bare 10/11 digits; ndc_to_rxcui names the product it decoded to and its conceptType), rxcui_to_ingredients and rxcui_to_brands (RXCUI → ingredient/brand RXCUIs, each with the target's RxNorm name and its conceptType — read that before counting a combination product's ingredients). Drug-class directions (RxClass): rxcui_to_classes (RXCUI → its classes: pharmacologic class, mechanism of action, physiologic effect, pharmacokinetics, therapeutic category, chemical structure, the diseases it may treat, prevent, diagnose, or induce or is contraindicated with, VA class, DEA controlled-substance schedule, CDC vaccine code; a drug product also carries its ingredients' classes, naming the ingredient in via, while DEA schedules are recorded only on drug products and VA classes almost only there, so map a product for those) and class_to_rxcuis (class ID → its direct member RXCUIs, each with its RxNorm name and conceptType). Each class hit carries classType, source (the RxClass source asserting it), and relation — a ci_ relation is a contraindication, not an indication; narrow either direction with classType. Every result carries source provenance (which system or edge answered) so a chained call (e.g. into openfda with a resolved NDC) uses the right identifier. The children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, and class_to_rxcuis directions can return large sets and paginate: a nextCursor in the response is passed back as cursor (with an optional limit page size) to walk the full set. A field the direction does not use is rejected with field_not_applicable: limit and cursor on the point directions, classType outside the class directions, and a system other than RXNORM on the drug and class directions.

Input Schema

NameRequiredDescriptionDefault
fromYesThe source value: a code (for parents/children), a drug name, an NDC, an RXCUI, or an RxClass class ID (for class_to_rxcuis). Must not be blank or whitespace-only.
limitNoMax results per page, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Rejected on every other direction.
cursorNoOpaque continuation token from a previous response's `nextCursor`, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis). Omit for the first page; an empty string counts as omitted. A non-empty cursor on any other direction is rejected.
systemNoFor parents/children, force the source code into this system. Omit to auto-detect. The drug and class directions resolve in RxNorm and accept only "RXNORM" (no effect); any other value there is rejected.
classTypeNoFor rxcui_to_classes and class_to_rxcuis only: keep only classes of this RxClass type — EPC (FDA established pharmacologic class), MOA (mechanism of action), PE (physiologic effect), PK (pharmacokinetics), TC (therapeutic category), CHEM (chemical structure), DISEASE (diseases the drug may treat, prevent, diagnose, or induce, or is contraindicated with), VA (VA drug class, recorded almost only on drug products), SCHEDULE (DEA controlled-substance schedule, recorded on drug products only), CVX (CDC vaccine code). Omit for every type. Rejected on every other direction.
directionYesWhat to map to. parents/children return the immediate parent or children only (depth-1) — call iteratively to walk a full path; the rxcui/ndc/name directions are RxNorm drug crosswalks; rxcui_to_classes and class_to_rxcuis are RxClass drug-class crosswalks.

Output Schema

NameRequiredDescriptionDefault
capNoPaginated directions only: the page size that was applied.
fromNoThe source value, echoed back.
hitsNoCrosswalk results, each tagged with the edge that produced it.
errorNoPresent when the call failed. Absent on success.
shownNoPaginated directions only: number of hits returned on this page.
noticeNoGuidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; an ICD-10-PCS table row has no parent; RxNorm concepts have no code hierarchy; no bundled class, or none of the requested `classType`, covers the RXCUI; a class has no direct member), or the `cursor` starts past the last page of a direction that does have results.
directionNoThe mapping direction that was applied.
truncatedNoPaginated directions (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis) only: true when more results exist beyond this page.
nextCursorNoPaginated directions only: opaque token to pass back as `cursor` for the next page. Present only when more results exist beyond this page.
alsoInSystemsNoOther bundled systems holding the same `from` code string, present only when there is at least one (hierarchy directions only — a drug name, NDC, or RXCUI is not system-scoped). The hits above were walked in `resolvedSystem` alone; the code is a DIFFERENT code with a different hierarchy in each system listed here — "B00" is the ICD-10-CM category "Herpesviral [herpes simplex] infections" and also the ICD-10-PCS table row "Imaging, Central Nervous System, Plain Radiography". Re-call with `system` set to one of these values to walk it there.
resolvedSystemNoThe system the source resolved in, or null when not system-scoped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / hits / items / properties / conceptType / description
      Previous value: -"The target concept's RxNorm type, present on `rxcui_to_ingredients`, `rxcui_to_brands`, and `class_to_rxcuis` hits only. A class member may be any drug concept: an ingredient type below, or a drug product — \"SCD\"/\"SBD\" (clinical/branded drug) or \"GPCK\"/\"BPCK\" (generic/branded pack). Otherwise \"IN\" (ingredient), \"PIN\" (precise ingredient — a specific salt, ester, or isomer of an ingredient), \"MIN\" (multiple ingredients — a concept naming a combination, never a substance within it), or \"BN\" (brand name). Ingredient hits mix the first three, so the hit count is not the substance count: a \"MIN\" hit is the grouping concept and never counts, and a \"PIN\" names a form of a substance rather than an extra one — usually alongside the \"IN\" it refines, though two \"PIN\" esters can share a single \"IN\". Counting the \"IN\" hits is the closest reading, and under-counts those shared cases."New value: +"The target concept's RxNorm type, present on `name_to_rxcui`, `ndc_to_rxcui`, `rxcui_to_ingredients`, `rxcui_to_brands`, and `class_to_rxcuis` hits only. A drug-name match or a class member may be any drug concept: an ingredient type or brand name below, or a drug product — \"SCD\"/\"SBD\" (clinical/branded drug) or \"GPCK\"/\"BPCK\" (generic/branded pack), the four an `ndc_to_rxcui` hit always takes. Otherwise \"IN\" (ingredient), \"PIN\" (precise ingredient — a specific salt, ester, or isomer of an ingredient), \"MIN\" (multiple ingredients — a concept naming a combination, never a substance within it), or \"BN\" (brand name). Ingredient hits mix the first three, so the hit count is not the substance count: a \"MIN\" hit is the grouping concept and never counts, and a \"PIN\" names a form of a substance rather than an extra one — usually alongside the \"IN\" it refines, though two \"PIN\" esters can share a single \"IN\". Counting the \"IN\" hits is the closest reading, and under-counts those shared cases."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent; RxNorm concepts have no code hierarchy; no bundled class, or none of the requested `classType`, covers the RXCUI; a class has no direct member), or the `cursor` starts past the last page of a direction that does have results."New value: +"Guidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; an ICD-10-PCS table row has no parent; RxNorm concepts have no code hierarchy; no bundled class, or none of the requested `classType`, covers the RXCUI; a class has no direct member), or the `cursor` starts past the last page of a direction that does have results."
  2. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `field_not_applicable`: A `system`, `classType`, `limit`, or `cursor` was sent on a direction that does not use it. `no_mapping`: The source value did not resolve to any bundled code, drug, or class. `direction_unavailable`: A drug-crosswalk direction was requested but this build carries no RxNorm tables, or a class direction was requested but it carries no RxClass class layer. `ambiguous_system`: The source code is present in more than one system and no `system` was given. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `field_not_applicable`: A `system`, `classType`, `limit`, or `cursor` was sent on a direction that does not use it. `no_mapping`: The source value did not resolve to a bundled code, drug, or class the direction reads. The rxcui_to_* directions read RxNorm concepts only, and their miss names any other bundled system that holds the value. `direction_unavailable`: A drug-crosswalk direction was requested but this build carries no RxNorm tables, or a class direction was requested but it carries no RxClass class layer. `ambiguous_system`: The source code is present in more than one system and no `system` was given. Other values are possible when a failure originates below the handler."
  3. Changed18 schema fields changed
    • addedInput schema / properties / classType
      Added value: +{
      +  "description": "For rxcui_to_classes and class_to_rxcuis only: keep only classes of this RxClass type — EPC (FDA established pharmacologic class), MOA (mechanism of action), PE (physiologic effect), PK (pharmacokinetics), TC (therapeutic category), CHEM (chemical structure), DISEASE (diseases the drug may treat, prevent, diagnose, or induce, or is contraindicated with), VA (VA drug class, recorded almost only on drug products), SCHEDULE (DEA controlled-substance schedule, recorded on drug products only), CVX (CDC vaccine code). Omit for every type. Rejected on every other direction.",
      +  "enum": [
      +    "EPC",
      +    "MOA",
      +    "PE",
      +    "PK",
      +    "TC",
      +    "CHEM",
      +    "DISEASE",
      +    "VA",
      +    "SCHEDULE",
      +    "CVX"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / cursor / description
      Previous value: -"Opaque continuation token from a previous response's `nextCursor`, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc). Omit for the first page; an empty string counts as omitted. A non-empty cursor on any other direction is rejected."New value: +"Opaque continuation token from a previous response's `nextCursor`, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis). Omit for the first page; an empty string counts as omitted. A non-empty cursor on any other direction is rejected."
    • changedInput schema / properties / direction / description
      Previous value: -"What to map to. parents/children return the immediate parent or children only (depth-1) — call iteratively to walk a full path; the rxcui/ndc/name directions are RxNorm drug crosswalks."New value: +"What to map to. parents/children return the immediate parent or children only (depth-1) — call iteratively to walk a full path; the rxcui/ndc/name directions are RxNorm drug crosswalks; rxcui_to_classes and class_to_rxcuis are RxClass drug-class crosswalks."
    • changedInput schema / properties / direction / enum
      Previous value: -[
      -  "parents",
      -  "children",
      -  "name_to_rxcui",
      -  "ndc_to_rxcui",
      -  "rxcui_to_ndc",
      -  "rxcui_to_ingredients",
      -  "rxcui_to_brands"
      -]New value: +[
      +  "parents",
      +  "children",
      +  "name_to_rxcui",
      +  "ndc_to_rxcui",
      +  "rxcui_to_ndc",
      +  "rxcui_to_ingredients",
      +  "rxcui_to_brands",
      +  "rxcui_to_classes",
      +  "class_to_rxcuis"
      +]
    • changedInput schema / properties / from / description
      Previous value: -"The source value: a code (for parents/children), a drug name, an NDC, or an RXCUI. Must not be blank or whitespace-only."New value: +"The source value: a code (for parents/children), a drug name, an NDC, an RXCUI, or an RxClass class ID (for class_to_rxcuis). Must not be blank or whitespace-only."
    • changedInput schema / properties / limit / description
      Previous value: -"Max results per page, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Rejected on every other direction."New value: +"Max results per page, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Rejected on every other direction."
    • changedInput schema / properties / system / description
      Previous value: -"For parents/children, force the source code into this system. Omit to auto-detect. The drug directions resolve in RxNorm and accept only \"RXNORM\" (no effect); any other value there is rejected."New value: +"For parents/children, force the source code into this system. Omit to auto-detect. The drug and class directions resolve in RxNorm and accept only \"RXNORM\" (no effect); any other value there is rejected."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `field_not_applicable`: A `system`, `limit`, or `cursor` was sent on a direction that does not use it. `no_mapping`: The source value did not resolve to any bundled code. `direction_unavailable`: A drug-crosswalk direction was requested but this build carries no RxNorm tables. `ambiguous_system`: The source code is present in more than one system and no `system` was given. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `field_not_applicable`: A `system`, `classType`, `limit`, or `cursor` was sent on a direction that does not use it. `no_mapping`: The source value did not resolve to any bundled code, drug, or class. `direction_unavailable`: A drug-crosswalk direction was requested but this build carries no RxNorm tables, or a class direction was requested but it carries no RxClass class layer. `ambiguous_system`: The source code is present in more than one system and no `system` was given. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / hits / items / properties / classType
      Added value: +{
      +  "description": "The RxClass class type, on `rxcui_to_classes` and `class_to_rxcuis` hits only — the values the `classType` input takes.",
      +  "enum": [
      +    "EPC",
      +    "MOA",
      +    "PE",
      +    "PK",
      +    "TC",
      +    "CHEM",
      +    "DISEASE",
      +    "VA",
      +    "SCHEDULE",
      +    "CVX"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / hits / items / properties / conceptType / description
      Previous value: -"The target concept's RxNorm type, present on `rxcui_to_ingredients` and `rxcui_to_brands` hits only: \"IN\" (ingredient), \"PIN\" (precise ingredient — a specific salt, ester, or isomer of an ingredient), \"MIN\" (multiple ingredients — a concept naming a combination, never a substance within it), or \"BN\" (brand name). Ingredient hits mix the first three, so the hit count is not the substance count: a \"MIN\" hit is the grouping concept and never counts, and a \"PIN\" names a form of a substance rather than an extra one — usually alongside the \"IN\" it refines, though two \"PIN\" esters can share a single \"IN\". Counting the \"IN\" hits is the closest reading, and under-counts those shared cases."New value: +"The target concept's RxNorm type, present on `rxcui_to_ingredients`, `rxcui_to_brands`, and `class_to_rxcuis` hits only. A class member may be any drug concept: an ingredient type below, or a drug product — \"SCD\"/\"SBD\" (clinical/branded drug) or \"GPCK\"/\"BPCK\" (generic/branded pack). Otherwise \"IN\" (ingredient), \"PIN\" (precise ingredient — a specific salt, ester, or isomer of an ingredient), \"MIN\" (multiple ingredients — a concept naming a combination, never a substance within it), or \"BN\" (brand name). Ingredient hits mix the first three, so the hit count is not the substance count: a \"MIN\" hit is the grouping concept and never counts, and a \"PIN\" names a form of a substance rather than an extra one — usually alongside the \"IN\" it refines, though two \"PIN\" esters can share a single \"IN\". Counting the \"IN\" hits is the closest reading, and under-counts those shared cases."
    • changedOutput schema / properties / hits / items / properties / description / description
      Previous value: -"Description of the target when available: the code description for hierarchy hits, the official RxNorm name for the `name_to_rxcui`, `ndc_to_rxcui`, `rxcui_to_ingredients`, and `rxcui_to_brands` drug concepts. Absent for `rxcui_to_ndc`, whose targets are package identifiers with no description of their own."New value: +"Description of the target when available: the code description for hierarchy hits, the official RxNorm name for the `name_to_rxcui`, `ndc_to_rxcui`, `rxcui_to_ingredients`, `rxcui_to_brands`, and `class_to_rxcuis` drug concepts, and the class name for `rxcui_to_classes`. Absent for `rxcui_to_ndc`, whose targets are package identifiers with no description of their own."
    • addedOutput schema / properties / hits / items / properties / relation
      Added value: +{
      +  "description": "The RxClass relationship between the drug and the class, on `rxcui_to_classes` and `class_to_rxcuis` hits only: has_epc, has_moa, has_pe, has_pk, site_of_metabolism, has_tc, has_ingredient / has_chemical_structure / has_active_metabolites (CHEM), may_treat / may_prevent / may_diagnose / induces (DISEASE), has_vaclass / has_vaclass_extended, has_schedule, isa_cvx. A `ci_` relation (ci_with, ci_moa, ci_pe, ci_chemclass) is a contraindication: the drug is contraindicated with that disease or class — never an indication, and never class membership.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / hits / items / properties / source / description
      Previous value: -"Which system or relationship edge produced this hit (e.g. \"ICD10CM\", \"has_ingredient\", \"NDC\")."New value: +"Which system or relationship edge produced this hit (e.g. \"ICD10CM\", \"has_ingredient\", \"NDC\"). On the class directions, the RxClass source asserting the drug–class edge: \"MEDRT\" (VA MED-RT), \"FDASPL\" (FDA structured product labels), \"FMTSME\" (Federal Medication Terminologies), \"VA\" (VA National Formulary classes), \"RXNORM\" (DEA schedules as RxNorm records them), or \"CDC\" (CVX vaccine codes)."
    • changedOutput schema / properties / hits / items / properties / system / description
      Previous value: -"The code system of the target value, or null when the target is not a system code (e.g. an NDC)."New value: +"The code system of the target value, or null when the target is not a system code (an NDC, or an RxClass class ID)."
    • changedOutput schema / properties / hits / items / properties / value / description
      Previous value: -"The mapped target value (a code, RXCUI, or NDC)."New value: +"The mapped target value (a code, RXCUI, NDC, or RxClass class ID)."
    • addedOutput schema / properties / hits / items / properties / via
      Added value: +{
      +  "description": "On `rxcui_to_classes` hits only: the ingredient RXCUI a drug product inherits this class through — RxClass attaches most classes to ingredients. Absent when the class attaches to the source RXCUI itself. When several ingredients carry the same class, names an ingredient (\"IN\") over its precise ingredient (\"PIN\"), then the lowest RXCUI.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent; RxNorm concepts have no code hierarchy), or the `cursor` starts past the last page of a direction that does have results."New value: +"Guidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent; RxNorm concepts have no code hierarchy; no bundled class, or none of the requested `classType`, covers the RXCUI; a class has no direct member), or the `cursor` starts past the last page of a direction that does have results."
    • changedOutput schema / properties / truncated / description
      Previous value: -"Paginated directions (children, name_to_rxcui, rxcui_to_ndc) only: true when more results exist beyond this page."New value: +"Paginated directions (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis) only: true when more results exist beyond this page."
  4. Changed6 schema fields changed
    • changedInput schema / properties / cursor / description
      Previous value: -"Opaque continuation token from a previous response's `nextCursor`, for the paginated directions (children, name_to_rxcui, rxcui_to_ndc). Omit for the first page."New value: +"Opaque continuation token from a previous response's `nextCursor`, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc). Omit for the first page; an empty string counts as omitted. A non-empty cursor on any other direction is rejected."
    • changedInput schema / properties / limit / description
      Previous value: -"Max results per page for the paginated directions (children, name_to_rxcui, rxcui_to_ndc). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Ignored by the point directions."New value: +"Max results per page, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Rejected on every other direction."
    • changedInput schema / properties / system / description
      Previous value: -"For parents/children, force the source code into this system. Omit to auto-detect."New value: +"For parents/children, force the source code into this system. Omit to auto-detect. The drug directions resolve in RxNorm and accept only \"RXNORM\" (no effect); any other value there is rejected."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `no_mapping`: The source value did not resolve to any bundled code. `direction_unavailable`: A drug-crosswalk direction was requested but this build carries no RxNorm tables. `ambiguous_system`: The source code is present in more than one system and no `system` was given. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `field_not_applicable`: A `system`, `limit`, or `cursor` was sent on a direction that does not use it. `no_mapping`: The source value did not resolve to any bundled code. `direction_unavailable`: A drug-crosswalk direction was requested but this build carries no RxNorm tables. `ambiguous_system`: The source code is present in more than one system and no `system` was given. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "no_mapping",
      -  "direction_unavailable",
      -  "ambiguous_system"
      -]New value: +[
      +  "field_not_applicable",
      +  "no_mapping",
      +  "direction_unavailable",
      +  "ambiguous_system"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent), or the `cursor` starts past the last page of a direction that does have results."New value: +"Guidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent; RxNorm concepts have no code hierarchy), or the `cursor` starts past the last page of a direction that does have results."
  5. Changed4 schema fields changed
    • removedOutput schema / properties / hits / items / properties / system / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / hits / items / properties / system / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / resolvedSystem / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / resolvedSystem / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  6. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "from",
      +      "direction",
      +      "resolvedSystem",
      +      "hits"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `no_mapping`: The source value did not resolve to any bundled code. `direction_unavailable`: A drug-crosswalk direction was requested but this build carries no RxNorm tables. `ambiguous_system`: The source code is present in more than one system and no `system` was given. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "no_mapping",
      +            "direction_unavailable",
      +            "ambiguous_system"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "from",
      -  "direction",
      -  "resolvedSystem",
      -  "hits"
      -]
  7. Changed7 schema fields changed
    • changedInput schema / properties / cursor / description
      Previous value: -"Opaque continuation token from a previous response's `nextCursor`, for the paginated directions (children, name_to_rxcui). Omit for the first page."New value: +"Opaque continuation token from a previous response's `nextCursor`, for the paginated directions (children, name_to_rxcui, rxcui_to_ndc). Omit for the first page."
    • changedInput schema / properties / limit / description
      Previous value: -"Max results per page for the paginated directions (children, name_to_rxcui). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Ignored by the point directions."New value: +"Max results per page for the paginated directions (children, name_to_rxcui, rxcui_to_ndc). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Ignored by the point directions."
    • addedOutput schema / properties / alsoInSystems
      Added value: +{
      +  "description": "Other bundled systems holding the same `from` code string, present only when there is at least one (hierarchy directions only — a drug name, NDC, or RXCUI is not system-scoped). The hits above were walked in `resolvedSystem` alone; the code is a DIFFERENT code with a different hierarchy in each system listed here — \"B00\" is the ICD-10-CM category \"Herpesviral [herpes simplex] infections\" and also the ICD-10-PCS table row \"Imaging, Central Nervous System, Plain Radiography\". Re-call with `system` set to one of these values to walk it there.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / hits / items / properties / conceptType
      Added value: +{
      +  "description": "The target concept's RxNorm type, present on `rxcui_to_ingredients` and `rxcui_to_brands` hits only: \"IN\" (ingredient), \"PIN\" (precise ingredient — a specific salt, ester, or isomer of an ingredient), \"MIN\" (multiple ingredients — a concept naming a combination, never a substance within it), or \"BN\" (brand name). Ingredient hits mix the first three, so the hit count is not the substance count: a \"MIN\" hit is the grouping concept and never counts, and a \"PIN\" names a form of a substance rather than an extra one — usually alongside the \"IN\" it refines, though two \"PIN\" esters can share a single \"IN\". Counting the \"IN\" hits is the closest reading, and under-counts those shared cases.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / hits / items / properties / description / description
      Previous value: -"Description of the target when available."New value: +"Description of the target when available: the code description for hierarchy hits, the official RxNorm name for the `name_to_rxcui`, `ndc_to_rxcui`, `rxcui_to_ingredients`, and `rxcui_to_brands` drug concepts. Absent for `rxcui_to_ndc`, whose targets are package identifiers with no description of their own."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when a resolvable code has no edge in the requested direction (e.g. a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent)."New value: +"Guidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent), or the `cursor` starts past the last page of a direction that does have results."
    • changedOutput schema / properties / truncated / description
      Previous value: -"Paginated directions (children, name_to_rxcui) only: true when more results exist beyond this page."New value: +"Paginated directions (children, name_to_rxcui, rxcui_to_ndc) only: true when more results exist beyond this page."
  8. Changed1 schema field changed
    • changedInput schema / properties / from / description
      Previous value: -"The source value: a code (for parents/children), a drug name, an NDC, or an RXCUI."New value: +"The source value: a code (for parents/children), a drug name, an NDC, or an RXCUI. Must not be blank or whitespace-only."
  9. Changed6 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque continuation token from a previous response's `nextCursor`, for the paginated directions (children, name_to_rxcui). Omit for the first page.",
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Max results per page for the paginated directions (children, name_to_rxcui). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Ignored by the point directions.",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "Paginated directions only: the page size that was applied.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / nextCursor
      Added value: +{
      +  "description": "Paginated directions only: opaque token to pass back as `cursor` for the next page. Present only when more results exist beyond this page.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Paginated directions only: number of hits returned on this page.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "Paginated directions (children, name_to_rxcui) only: true when more results exist beyond this page.",
      +  "type": "boolean"
      +}
  10. Changed1 schema field changed
    • changedInput schema / properties / direction / description
      Previous value: -"What to map to. parents/children return the immediate parent or children only (depth-1) — call iteratively to walk a full path; the rxcui/ndc/name directions are RxNorm drug crosswalks (phase 2)."New value: +"What to map to. parents/children return the immediate parent or children only (depth-1) — call iteratively to walk a full path; the rxcui/ndc/name directions are RxNorm drug crosswalks."
  11. Changed2 schema fields changed
    • changedInput schema / properties / direction / description
      Previous value: -"What to map to. parents/children walk the code hierarchy; the rxcui/ndc/name directions are RxNorm drug crosswalks (phase 2)."New value: +"What to map to. parents/children return the immediate parent or children only (depth-1) — call iteratively to walk a full path; the rxcui/ndc/name directions are RxNorm drug crosswalks (phase 2)."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when a resolvable code has no edge in the requested direction (e.g. a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent).",
      +  "type": "string"
      +}
  12. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations: an unresolvable edge returns a successful empty result with a notice rather than an error, `alsoInSystems` signals codes present in multiple bundled systems, every hit carries `source` provenance for chaining, and specific fields are rejected with `field_not_applicable`. It also flags traps an agent would otherwise fall into, e.g. `ci_` relations are contraindications not indications, and `conceptType` must be read before counting a combination product's ingredients.

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 and information-dense — nearly every clause carries an operational fact and nothing is repeated from the schema. The cost is a single unbroken block of 400+ words with deeply nested parentheticals, which makes targeted re-reading (e.g. confirming the NDC format rules) harder than it needs to be.

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 six-parameter tool with nine directions, an output schema, and non-obvious edge cases, the description covers the behaviors an agent must know: depth-1 iteration, empty-versus-error, pagination, provenance for chained openfda calls, and per-direction field rejection. Nothing material is left to guess.

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 already 100%, yet the description still adds real semantics: accepted NDC formats, which directions paginate and how cursor/limit are threaded back, and which directions reject `classType`, `system`, `limit`, or `cursor`. It explains the meaning of the hierarchy-edge rules (X-padded ICD-10-CM levels, PCS three-character table rows, no RxNorm code hierarchy) that the schema cannot express.

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?

Opens with a specific verb and resource ("Crosswalk a US medical code or drug across systems and within a hierarchy") and then enumerates every direction by name, so an agent knows exactly which capability they are calling. It is clearly not a lookup (medcode_get_code), search, or hierarchy-browse tool — it is a directional mapping tool.

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 concrete when-to-use guidance per direction: parents/children are depth-1 and must be called iteratively for a full path, classType narrows either class direction, and a product must be mapped for DEA schedules and VA classes because those live on products. It does not explicitly contrast itself with siblings such as medcode_browse_hierarchy (which sounds adjacent to iterative parents/children walking), leaving one routing ambiguity.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.