# MARS (advanced systemic mastocytosis)

MARS

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

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

## What it computes

Sum the Jawhar 2019 mutation-adjusted risk score (MARS) for advanced systemic mastocytosis and return low (0–1), intermediate (2), or high (3–5).

## When to use

When an agent needs the published MARS point total and risk band for AdvSM and must not invent a WHO SM diagnosis, sequence S/A/R mutations, or substitute Nazha MDS machine-learning scores.

## When not to use

- Not a medical device and not a WHO SM diagnosis (see related who-sm). magent does not examine the patient.
- This is Jawhar 2019 MARS for advanced systemic mastocytosis only. Not indolent SM. Not cutaneous mastocytosis. Not Nazha MDS machine-learning scores.
- magent does not sequence. sar_mutation_count is the caller-assigned count of S/A/R mutations among SRSF2, ASXL1, and RUNX1 (0, 1, or 2 meaning two or more). Exactly one scores 1; two or more scores 2, not 1 plus 2.
- magent does not assay hemoglobin or platelets. Labs are caller-supplied. Provide hemoglobin_g_dl or hemoglobin_g_l, not both.
- Training-set median OS (Jawhar 2019): low not reached, intermediate 3.9 years, high 1.9 years. Validation-set OS (12.2 / 4.4 / 1.9 years) is a cohort figure, not a second band and not a patient-specific prediction.

## Formula

```
MARS = age_gt_60 1 + hemoglobin_lt_10 1 + platelets_lt_100 1 + sar_mutations (exactly one S/A/R 1, two or more 2; SRSF2, ASXL1, RUNX1); Jawhar 2019; max 5; low 0-1 (training-set median OS not reached), intermediate 2 (3.9 years), high 3-5 (1.9 years)
```

## Citation

[MARS: Mutation-Adjusted Risk Score for Advanced Systemic Mastocytosis](https://doi.org/10.1200/JCO.19.00640)
Jawhar M, Schwaab J, Álvarez-Twose I, Shoumariyeh K, Naumann N, Lübke J, Perkins C, Muñoz-González JI, Meggendorfer M, Kennedy V, Metzgeroth G, Fabarius A, Pfeifer D, Sotlar K, Horny HP, von Bubnoff N, Haferlach T, Cross NCP, Hofmann WK, Sperr WR, García-Montero AC, Valent P, Gotlib J, Orfao A, Reiter A
J Clin Oncol. 2019;37(31):2846-2856
DOI: [10.1200/JCO.19.00640](https://doi.org/10.1200/JCO.19.00640)

## Worked example

### No adverse MARS factors

Given: `age=50, hemoglobin_g_dl=12, platelets_10e9_l=200, sar_mutation_count=0`

1. age 50 ≤60 → 0; hemoglobin 12 ≥10 → 0; platelets 200 ≥100 → 0; sar_mutation_count 0 → 0
2. Score = 0 (max 5); risk_band = low (0–1); training-set median OS not reached


### Age, anemia, thrombocytopenia, and two or more S/A/R mutations

Given: `age=65, hemoglobin_g_dl=9, platelets_10e9_l=80, sar_mutation_count=2`

1. age >60 → 1; hemoglobin <10 → 1; platelets <100 → 1; two or more S/A/R → 2 (do not also add the +1)
2. Score = 5 (max 5); risk_band = high (3–5); training-set median OS 1.9 years


## Also searched as

- mutation-adjusted risk score
- Jawhar MARS
- advanced systemic mastocytosis MARS
- AdvSM risk score
- SRSF2 ASXL1 RUNX1 score
- S/A/R mutation score
- systemic mastocytosis prognosis
- MARS AdvSM

## Parameters

- `age` (integer, required): Age in years (integer 18-120). >60 scores 1 (Jawhar 2019). Age 61 scores; age 60 is the ≤60 arm and scores 0.
- `hemoglobin_g_dl` (number, optional): Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. <10 g/dL (<100 g/L) scores 1 (Jawhar 2019). 10.0 is the ≥10 arm and scores 0. magent does not assay hemoglobin.
- `hemoglobin_g_l` (number, optional): Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both. <100 g/L scores 1. 100 is the ≥100 arm and scores 0.
- `platelets_10e9_l` (number, required): Platelet count in 10^9/L (1-2000). <100 scores 1 (Jawhar 2019). 100.0 is the ≥100 arm and scores 0. magent does not assay platelets.
- `sar_mutation_count` (integer, required): Caller-assigned count of S/A/R mutations among SRSF2, ASXL1, and RUNX1 (integer 0, 1, or 2; 2 means two or more). Exactly one scores 1. Two or more scores 2 (not 1 plus 2). Count 0 scores 0. magent does not sequence.

## 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/mars`
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": [
    {
      "age": "50",
      "hemoglobin_g_dl": "12",
      "platelets_10e9_l": "200",
      "sar_mutation_count": "0"
    },
    {
      "age": "50",
      "hemoglobin_g_dl": "12",
      "platelets_10e9_l": "200",
      "sar_mutation_count": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mars",
  "items": [
    {
      "components": [
        {
          "value": 50,
          "factor": "age_gt_60",
          "points": 0,
          "present": false
        },
        {
          "value": 12.0,
          "factor": "hemoglobin_lt_10",
          "points": 0,
          "present": false
        },
        {
          "value": 200.0,
          "factor": "platelets_lt_100",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "sar_mutations",
          "points": 0,
          "present": false
        }
      ],
      "age": 50,
      "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": "Jawhar M, Schwaab J, Álvarez-Twose I, Shoumariyeh K, Naumann N, Lübke J, Perkins C, Muñoz-González JI, Meggendorfer M, Kennedy V, Metzgeroth G, Fabarius A, Pfeifer D, Sotlar K, Horny HP, von Bubnoff N, Haferlach T, Cross NCP, Hofmann WK, Sperr WR, García-Montero AC, Valent P, Gotlib J, Orfao A, Reiter A",
        "doi": "10.1200/JCO.19.00640",
        "id": "jawhar-2019",
        "pmid": "31509472",
        "source": "J Clin Oncol. 2019;37(31):2846-2856",
        "title": "MARS: Mutation-Adjusted Risk Score for Advanced Systemic Mastocytosis"
      },
      "formula": "mars",
      "formula_expression": "MARS = age_gt_60 1 + hemoglobin_lt_10 1 + platelets_lt_100 1 + sar_mutations (exactly one S/A/R 1, two or more 2; SRSF2, ASXL1, RUNX1); Jawhar 2019; max 5; low 0-1 (training-set median OS not reached), intermediate 2 (3.9 years), high 3-5 (1.9 years)",
      "max_score": 5,
      "score": 0,
      "risk_band": "low",
      "platelets_10e9_l": 200.0,
      "hemoglobin_g_dl": 12.0,
      "sar_mutation_count": 0
    },
    {
      "components": [
        {
          "value": 50,
          "factor": "age_gt_60",
          "points": 0,
          "present": false
        },
        {
          "value": 12.0,
          "factor": "hemoglobin_lt_10",
          "points": 0,
          "present": false
        },
        {
          "value": 200.0,
          "factor": "platelets_lt_100",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "sar_mutations",
          "points": 0,
          "present": false
        }
      ],
      "age": 50,
      "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": "Jawhar M, Schwaab J, Álvarez-Twose I, Shoumariyeh K, Naumann N, Lübke J, Perkins C, Muñoz-González JI, Meggendorfer M, Kennedy V, Metzgeroth G, Fabarius A, Pfeifer D, Sotlar K, Horny HP, von Bubnoff N, Haferlach T, Cross NCP, Hofmann WK, Sperr WR, García-Montero AC, Valent P, Gotlib J, Orfao A, Reiter A",
        "doi": "10.1200/JCO.19.00640",
        "id": "jawhar-2019",
        "pmid": "31509472",
        "source": "J Clin Oncol. 2019;37(31):2846-2856",
        "title": "MARS: Mutation-Adjusted Risk Score for Advanced Systemic Mastocytosis"
      },
      "formula": "mars",
      "formula_expression": "MARS = age_gt_60 1 + hemoglobin_lt_10 1 + platelets_lt_100 1 + sar_mutations (exactly one S/A/R 1, two or more 2; SRSF2, ASXL1, RUNX1); Jawhar 2019; max 5; low 0-1 (training-set median OS not reached), intermediate 2 (3.9 years), high 3-5 (1.9 years)",
      "max_score": 5,
      "score": 0,
      "risk_band": "low",
      "platelets_10e9_l": 200.0,
      "hemoglobin_g_dl": 12.0,
      "sar_mutation_count": 0
    }
  ]
}
```

## Response fields

- `formula` (string): mars
- `formula_expression` (string): Exact expression used
- `score` (integer): MARS points 0-5 (unclamped; max published 5)
- `max_score` (integer): Always 5 (1+1+1+2)
- `risk_band` (string): low when score is 0-1, intermediate when 2, high when 3-5 (Jawhar 2019 training-set MARS). Not a WHO SM diagnosis. Not indolent SM. Not Nazha MDS scores.
- `age` (integer): Age in years used for the >60 criterion
- `hemoglobin_g_dl` (number): Hemoglobin in g/dL used for the <10 criterion (g/L inputs converted / 10)
- `platelets_10e9_l` (number): Platelets in 10^9/L used for the <100 criterion
- `sar_mutation_count` (integer): Caller-assigned S/A/R mutation count among SRSF2, ASXL1, RUNX1 (0, 1, or 2 meaning two or more)
- `components` (array): Per-factor points
- `citation` (object): Jawhar et al. J Clin Oncol 2019 MARS citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 50,
      "factor": "age_gt_60",
      "points": 0,
      "present": false
    },
    {
      "value": 12.0,
      "factor": "hemoglobin_lt_10",
      "points": 0,
      "present": false
    },
    {
      "value": 200.0,
      "factor": "platelets_lt_100",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "sar_mutations",
      "points": 0,
      "present": false
    }
  ],
  "age": 50,
  "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": "Jawhar M, Schwaab J, Álvarez-Twose I, Shoumariyeh K, Naumann N, Lübke J, Perkins C, Muñoz-González JI, Meggendorfer M, Kennedy V, Metzgeroth G, Fabarius A, Pfeifer D, Sotlar K, Horny HP, von Bubnoff N, Haferlach T, Cross NCP, Hofmann WK, Sperr WR, García-Montero AC, Valent P, Gotlib J, Orfao A, Reiter A",
    "doi": "10.1200/JCO.19.00640",
    "id": "jawhar-2019",
    "pmid": "31509472",
    "source": "J Clin Oncol. 2019;37(31):2846-2856",
    "title": "MARS: Mutation-Adjusted Risk Score for Advanced Systemic Mastocytosis"
  },
  "formula": "mars",
  "formula_expression": "MARS = age_gt_60 1 + hemoglobin_lt_10 1 + platelets_lt_100 1 + sar_mutations (exactly one S/A/R 1, two or more 2; SRSF2, ASXL1, RUNX1); Jawhar 2019; max 5; low 0-1 (training-set median OS not reached), intermediate 2 (3.9 years), high 3-5 (1.9 years)",
  "max_score": 5,
  "score": 0,
  "risk_band": "low",
  "platelets_10e9_l": 200.0,
  "hemoglobin_g_dl": 12.0,
  "sar_mutation_count": 0
}
```

## Errors

- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 Returned before settlement; you are not charged.
- HTTP 400 `invalid_hemoglobin`: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.
- HTTP 400 `invalid_platelets`: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.
- HTTP 400 `invalid_sar_count`: sar_mutation_count must be 0, 1, or 2 (Jawhar 2019 MARS: number of S/A/R mutations among SRSF2, ASXL1, and RUNX1; 2 means two or more). magent does not sequence. 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 SM criteria](https://magentlab.com/docs/who-sm) — 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.
- [REMA](https://magentlab.com/docs/rema) — Sum the Álvarez-Twose 2012 REMA points (sex, serum baseline tryptase, pruritus/hives/angioedema, syncope or presyncope) and return whether the total is ≥2 (published clonality and systemic-mastocytosis triage threshold).

## 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.
