# getDrugClassesByRxcui

**Identifier:** `rxnorm_getDrugClassesByRxcui`

**Provider:** [RxNorm](https://kirha.com/providers/rxnorm.md)

Get drug classifications (ATC, VA, MeSH, MedRT) for one or more RxNorm RxCUIs. Resolves RxCUIs (e.g. the rxcuis from openfda-mcp) to ATC codes for cross-MCP drug joins.

## Run it with the CLI

```bash
kirha tools run rxnorm_getDrugClassesByRxcui \
  --input '{
    "rxcuis": [
      "<rxcuis>"
    ]
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "rxnorm_getDrugClassesByRxcui",
  "input": {
    "rxcuis": [
      "<rxcuis>"
    ]
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "relaSource": {
      "enum": [
        "atc",
        "atc_product",
        "va",
        "medrt",
        "mesh",
        "dailymed",
        "fda_spl",
        "snomed_ct"
      ],
      "type": "string"
    },
    "rxcuis": {
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "rxcuis"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "atcCodes": {
      "description": "Join key across drug MCPs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "classIds": {
      "description": "Class IDs for further lookups",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "classifications": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "classId": {
            "type": "string"
          },
          "className": {
            "type": "string"
          },
          "classType": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "relationship": {
            "type": "string"
          },
          "rxcuiCount": {
            "description": "Product RxCUIs carrying this classification before the cap",
            "type": "number"
          },
          "rxcuis": {
            "description": "First 5 product RxCUIs (from the query) carrying this classification",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "query",
          "classId",
          "className",
          "classType",
          "rxcuis",
          "rxcuiCount"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    },
    "missing": {
      "description": "Input RxCUIs that returned no classifications",
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "classifications",
    "atcCodes",
    "classIds",
    "missing"
  ],
  "type": "object"
}
```

-----

[All RxNorm tools](https://kirha.com/providers/rxnorm.md) · [< Back to tools list](https://kirha.com/tools.md)