# WHO 2016 systemic mastocytosis criteria

WHO 2016 SM criteria

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/who_sm`
HTML: https://magentlab.com/docs/who-sm
Markdown: https://magentlab.com/docs/who-sm.md

Not a medical device. Not a diagnosis, dose, or listing recommendation.

## What it computes

Apply the Valent 2016 / WHO 2016 systemic mastocytosis diagnostic criteria (Table 1) and return whether the published combination of the major criterion plus at least one minor, or at least three minors, is met. Tryptase >20 ng/mL does not count when an unrelated myeloid neoplasm is present.

## When to use

When an agent already has caller-assigned WHO 2016 SM major and minor flags and needs the published criteria result. magent does not diagnose systemic mastocytosis, does not read a biopsy, and does not assay tryptase.

## When not to use

- Not a medical device.
- Not a diagnosis. Criteria met is not a systemic mastocytosis diagnosis without the rest of the WHO 2016 workup.
- Not cutaneous mastocytosis only. This tool is WHO 2016 systemic mastocytosis (Table 1) only.
- Not ICC 2022. CD30 is not a 2016 minor criterion on this tool.
- magent does not read a biopsy or assay tryptase. All flags are caller-assigned.
- When associated_myeloid_neoplasm is true, tryptase_gt_20 does not count as a minor (Valent 2016 Table 1 item d is not valid).

## Formula

```
diagnosed iff (major_infiltrates and minor_count ≥ 1) or minor_count ≥ 3; minor_count counts atypical_or_spindle, kit_codon_816, cd2_or_cd25, and tryptase_gt_20 only when associated_myeloid_neoplasm is false (Valent 2016 Table 1 WHO SM). Not a diagnosis. Not cutaneous mastocytosis only. Not ICC 2022
```

## Citation

[Mastocytosis: 2016 updated WHO classification and novel emerging treatment concepts](https://doi.org/10.1182/blood-2016-09-731893)
Valent P, Akin C, Hartmann K, Nilsson G, Reiter A, Hermine O, Sotlar K, Sperr WR, Escribano L, George TI, Kluin-Nelemans HC, Ustun C, Triggiani M, Brockow K, Gotlib J, Orfao A, Schwartz LB, Horny HP, Galli SJ, Arock M, Metcalfe DD
Blood. 2017;129(11):1420-1427 (Epub 2016 Dec 28)
DOI: [10.1182/blood-2016-09-731893](https://doi.org/10.1182/blood-2016-09-731893)

## Worked example

### Major infiltrates plus KIT codon 816

Given: `associated_myeloid_neoplasm=false, atypical_or_spindle=false, cd2_or_cd25=false, kit_codon_816=true, major_infiltrates=true, tryptase_gt_20=false`

1. major_infiltrates true → major true
2. kit_codon_816 true; remaining minors false; associated_myeloid_neoplasm false → minor_count 1
3. diagnosed true (major plus ≥1 minor)


### Three minors without the major

Given: `associated_myeloid_neoplasm=false, atypical_or_spindle=true, cd2_or_cd25=true, kit_codon_816=true, major_infiltrates=false, tryptase_gt_20=false`

1. major_infiltrates false
2. atypical_or_spindle, kit_codon_816, and cd2_or_cd25 true → minor_count 3
3. diagnosed true (≥3 minors)


### Two minors without the major, not SM

Given: `associated_myeloid_neoplasm=false, atypical_or_spindle=true, cd2_or_cd25=false, kit_codon_816=true, major_infiltrates=false, tryptase_gt_20=false`

1. major_infiltrates false
2. atypical_or_spindle and kit_codon_816 true → minor_count 2
3. diagnosed false (need major plus ≥1 minor, or ≥3 minors)


### Major plus tryptase ignored with an associated myeloid neoplasm

Given: `associated_myeloid_neoplasm=true, atypical_or_spindle=false, cd2_or_cd25=false, kit_codon_816=false, major_infiltrates=true, tryptase_gt_20=true`

1. major_infiltrates true; tryptase_gt_20 true; associated_myeloid_neoplasm true
2. item d is not valid → tryptase_counts false → minor_count 0
3. diagnosed false (major without a counted minor)


### Major plus tryptase without an associated myeloid neoplasm

Given: `associated_myeloid_neoplasm=false, atypical_or_spindle=false, cd2_or_cd25=false, kit_codon_816=false, major_infiltrates=true, tryptase_gt_20=true`

1. major_infiltrates true; tryptase_gt_20 true; associated_myeloid_neoplasm false
2. tryptase_counts true → minor_count 1
3. diagnosed true (major plus ≥1 minor)


## Also searched as

- WHO 2016 systemic mastocytosis
- SM diagnostic criteria
- KIT codon 816 mastocytosis
- Valent 2016 mastocytosis
- CD25 mast cells WHO
- serum tryptase systemic mastocytosis
- WHO SM major minor criteria
- atypical spindle mast cells

## Parameters

- `major_infiltrates` (boolean, required): Multifocal dense infiltrates of mast cells (≥15 MCs in aggregates) in bone marrow or another extracutaneous organ, as assigned by the caller (Valent 2016 Table 1 major). true or false. magent does not read a biopsy.
- `atypical_or_spindle` (boolean, required): >25% atypical (type I/II) or spindle-shaped mast cells in infiltrates or smears, as assigned by the caller (Valent 2016 Table 1 minor a). true or false. magent does not read slides.
- `kit_codon_816` (boolean, required): KIT point mutation at codon 816 in bone marrow or another extracutaneous organ, as assigned by the caller (Valent 2016 Table 1 minor b). true or false. magent does not sequence KIT.
- `cd2_or_cd25` (boolean, required): Mast cells in bone marrow, blood, or another extracutaneous organ exhibit CD2 and/or CD25, as assigned by the caller (Valent 2016 Table 1 minor c). true or false. magent does not phenotype mast cells.
- `tryptase_gt_20` (boolean, required): Baseline serum tryptase >20 ng/mL as assigned by the caller (Valent 2016 Table 1 minor d). Does not count when associated_myeloid_neoplasm is true. true or false. magent does not assay tryptase.
- `associated_myeloid_neoplasm` (boolean, required): Unrelated myeloid neoplasm present as assigned by the caller (Valent 2016 Table 1: item d is not valid). When true, tryptase_gt_20 does not count as a minor. true or false. magent does not diagnose a myeloid neoplasm.

## Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

Method: `POST /api/calc/who_sm`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: PREVIEW

- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
- The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
- HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
- Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
- x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request:

```json
{
  "items": [
    {
      "associated_myeloid_neoplasm": "false",
      "atypical_or_spindle": "false",
      "cd2_or_cd25": "false",
      "kit_codon_816": "true",
      "major_infiltrates": "true",
      "tryptase_gt_20": "false"
    },
    {
      "associated_myeloid_neoplasm": "false",
      "atypical_or_spindle": "false",
      "cd2_or_cd25": "false",
      "kit_codon_816": "true",
      "major_infiltrates": "true",
      "tryptase_gt_20": "false"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/who-sm

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/who_sm",
  "items": [
    {
      "major": true,
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "citation": {
        "authors": "Valent P, Akin C, Hartmann K, Nilsson G, Reiter A, Hermine O, Sotlar K, Sperr WR, Escribano L, George TI, Kluin-Nelemans HC, Ustun C, Triggiani M, Brockow K, Gotlib J, Orfao A, Schwartz LB, Horny HP, Galli SJ, Arock M, Metcalfe DD",
        "doi": "10.1182/blood-2016-09-731893",
        "id": "valent-2016",
        "pmid": "28031180",
        "source": "Blood. 2017;129(11):1420-1427 (Epub 2016 Dec 28)",
        "title": "Mastocytosis: 2016 updated WHO classification and novel emerging treatment concepts"
      },
      "formula": "who_sm",
      "formula_expression": "diagnosed iff (major_infiltrates and minor_count ≥ 1) or minor_count ≥ 3; minor_count counts atypical_or_spindle, kit_codon_816, cd2_or_cd25, and tryptase_gt_20 only when associated_myeloid_neoplasm is false (Valent 2016 Table 1 WHO SM). Not a diagnosis. Not cutaneous mastocytosis only. Not ICC 2022",
      "criteria": [
        {
          "factor": "major",
          "met": true
        },
        {
          "factor": "atypical_or_spindle",
          "met": false
        },
        {
          "factor": "kit_codon_816",
          "met": true
        },
        {
          "factor": "cd2_or_cd25",
          "met": false
        },
        {
          "factor": "tryptase_counts",
          "met": false
        },
        {
          "factor": "associated_myeloid_neoplasm",
          "met": false
        },
        {
          "factor": "minor_count_ge_1",
          "met": true
        },
        {
          "factor": "minor_count_ge_3",
          "met": false
        }
      ],
      "minor_count": 1,
      "associated_myeloid_neoplasm": false,
      "atypical_or_spindle": false,
      "cd2_or_cd25": false,
      "diagnosed": true,
      "kit_codon_816": true,
      "major_infiltrates": true,
      "tryptase_counts": false,
      "tryptase_gt_20": false
    },
    {
      "major": true,
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "citation": {
        "authors": "Valent P, Akin C, Hartmann K, Nilsson G, Reiter A, Hermine O, Sotlar K, Sperr WR, Escribano L, George TI, Kluin-Nelemans HC, Ustun C, Triggiani M, Brockow K, Gotlib J, Orfao A, Schwartz LB, Horny HP, Galli SJ, Arock M, Metcalfe DD",
        "doi": "10.1182/blood-2016-09-731893",
        "id": "valent-2016",
        "pmid": "28031180",
        "source": "Blood. 2017;129(11):1420-1427 (Epub 2016 Dec 28)",
        "title": "Mastocytosis: 2016 updated WHO classification and novel emerging treatment concepts"
      },
      "formula": "who_sm",
      "formula_expression": "diagnosed iff (major_infiltrates and minor_count ≥ 1) or minor_count ≥ 3; minor_count counts atypical_or_spindle, kit_codon_816, cd2_or_cd25, and tryptase_gt_20 only when associated_myeloid_neoplasm is false (Valent 2016 Table 1 WHO SM). Not a diagnosis. Not cutaneous mastocytosis only. Not ICC 2022",
      "criteria": [
        {
          "factor": "major",
          "met": true
        },
        {
          "factor": "atypical_or_spindle",
          "met": false
        },
        {
          "factor": "kit_codon_816",
          "met": true
        },
        {
          "factor": "cd2_or_cd25",
          "met": false
        },
        {
          "factor": "tryptase_counts",
          "met": false
        },
        {
          "factor": "associated_myeloid_neoplasm",
          "met": false
        },
        {
          "factor": "minor_count_ge_1",
          "met": true
        },
        {
          "factor": "minor_count_ge_3",
          "met": false
        }
      ],
      "minor_count": 1,
      "associated_myeloid_neoplasm": false,
      "atypical_or_spindle": false,
      "cd2_or_cd25": false,
      "diagnosed": true,
      "kit_codon_816": true,
      "major_infiltrates": true,
      "tryptase_counts": false,
      "tryptase_gt_20": false
    }
  ]
}
```

## Response fields

- `formula` (string): who_sm
- `formula_expression` (string): Valent 2016 Table 1 WHO SM major/minor combination
- `diagnosed` (boolean): true iff major_infiltrates and minor_count ≥ 1, or minor_count ≥ 3. Not a diagnosis. Not cutaneous mastocytosis only. Not ICC 2022.
- `major` (boolean): Echo of caller-assigned major_infiltrates (Valent 2016 Table 1 major)
- `minor_count` (integer): Count of atypical_or_spindle, kit_codon_816, cd2_or_cd25, and tryptase_gt_20 when associated_myeloid_neoplasm is false
- `tryptase_counts` (boolean): true iff tryptase_gt_20 and associated_myeloid_neoplasm is false (item d valid)
- `major_infiltrates` (boolean): Caller-assigned multifocal dense mast-cell infiltrates flag used
- `atypical_or_spindle` (boolean): Caller-assigned >25% atypical or spindle-shaped mast-cell flag used
- `kit_codon_816` (boolean): Caller-assigned KIT codon 816 mutation flag used
- `cd2_or_cd25` (boolean): Caller-assigned CD2 and/or CD25 mast-cell flag used
- `tryptase_gt_20` (boolean): Caller-assigned baseline serum tryptase >20 ng/mL flag used
- `associated_myeloid_neoplasm` (boolean): Caller-assigned unrelated myeloid neoplasm flag used; when true, tryptase does not count
- `criteria` (array): Per-factor rows with factor and met for major, each counted minor, tryptase_counts, associated_myeloid_neoplasm, and the ≥1 / ≥3 minor thresholds
- `citation` (object): Valent 2016 Blood WHO SM citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "major": true,
  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
  "citation": {
    "authors": "Valent P, Akin C, Hartmann K, Nilsson G, Reiter A, Hermine O, Sotlar K, Sperr WR, Escribano L, George TI, Kluin-Nelemans HC, Ustun C, Triggiani M, Brockow K, Gotlib J, Orfao A, Schwartz LB, Horny HP, Galli SJ, Arock M, Metcalfe DD",
    "doi": "10.1182/blood-2016-09-731893",
    "id": "valent-2016",
    "pmid": "28031180",
    "source": "Blood. 2017;129(11):1420-1427 (Epub 2016 Dec 28)",
    "title": "Mastocytosis: 2016 updated WHO classification and novel emerging treatment concepts"
  },
  "formula": "who_sm",
  "formula_expression": "diagnosed iff (major_infiltrates and minor_count ≥ 1) or minor_count ≥ 3; minor_count counts atypical_or_spindle, kit_codon_816, cd2_or_cd25, and tryptase_gt_20 only when associated_myeloid_neoplasm is false (Valent 2016 Table 1 WHO SM). Not a diagnosis. Not cutaneous mastocytosis only. Not ICC 2022",
  "criteria": [
    {
      "factor": "major",
      "met": true
    },
    {
      "factor": "atypical_or_spindle",
      "met": false
    },
    {
      "factor": "kit_codon_816",
      "met": true
    },
    {
      "factor": "cd2_or_cd25",
      "met": false
    },
    {
      "factor": "tryptase_counts",
      "met": false
    },
    {
      "factor": "associated_myeloid_neoplasm",
      "met": false
    },
    {
      "factor": "minor_count_ge_1",
      "met": true
    },
    {
      "factor": "minor_count_ge_3",
      "met": false
    }
  ],
  "minor_count": 1,
  "associated_myeloid_neoplasm": false,
  "atypical_or_spindle": false,
  "cd2_or_cd25": false,
  "diagnosed": true,
  "kit_codon_816": true,
  "major_infiltrates": true,
  "tryptase_counts": false,
  "tryptase_gt_20": false
}
```

## Errors

- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false Returned before settlement; you are not charged.
- HTTP 400 `invalid_items`: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
- HTTP 400 `invalid_item_count`: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
- HTTP 400 `invalid_item`: each items entry must be a JSON object Returned before settlement; you are not charged.

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [WHO 2016 PV criteria](https://magentlab.com/docs/who-pv) — Apply the Arber 2016 / WHO 2016 polycythemia vera diagnostic criteria and return whether the published combination of three majors, or major 1 and major 2 plus subnormal EPO, is met.
- [MIPSS70](https://magentlab.com/docs/mipss70) — Sum the Guglielmelli 2018 MIPSS70 (mutation-enhanced international prognostic score system) for transplantation-age primary myelofibrosis and return low (0–1), intermediate (2–4), or high (≥5).

## Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/docs/mcp

## Guarantees

- HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
- exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
- HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
- Execution is timeout-bounded and concurrency-capped.
- Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.
