MAGENT

Hematology · LIVE

REMA score

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

LIVE $0.005 USDC GET /api/calc/rema

Markdown: /docs/rema.md · Canonical: https://magentlab.com/docs/rema

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

What it computes

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

When to use

When an agent needs the published REMA point total from caller-assigned sex, baseline tryptase, cutaneous signs, and syncope or presyncope and must not invent a tryptase assay, a mastocytosis diagnosis, or WHO SM criteria.

When not to use

  • Not a medical device. Not a diagnosis of systemic mastocytosis. Not WHO SM criteria (that is who-sm).
  • magent does not assay tryptase. The caller supplies serum baseline tryptase (sBt) in μg/L.
  • Only the published REMA threshold (score ≥2) is returned. magent does not invent other cutoffs.
  • The caller assigns sex, cutaneous signs, and syncope or presyncope. magent does not take a history.

Formula

REMA = sex (male +1, female −1) + tryptase_ug_l (<15 −1, 15–25 0, >25 +2) + pruritus_hives_angioedema (true −2, false +1) + syncope_or_presyncope (true +3, false 0); range −4 to +7; clonality_likely iff score >= 2 (Álvarez-Twose 2012)

Citation

Title
Validation of the REMA score for predicting mast cell clonality and systemic mastocytosis in patients with systemic mast cell activation symptoms.
Authors
Alvarez-Twose I, González-de-Olano D, Sánchez-Muñoz L, Matito A, Jara-Acevedo M, Teodosio C, García-Montero A, Morgado JM, Orfao A, Escribano L
Source
Int Arch Allergy Immunol. 2012;157(3):275-280 (Epub 2011 Oct 28)
DOI
10.1159/000329856

Worked example

Male, tryptase 30 μg/L, no cutaneous signs, syncope

Given: pruritus_hives_angioedema=falsesex=malesyncope_or_presyncope=truetryptase_ug_l=30

  1. male → +1; tryptase 30 μg/L is >25 → +2; absence of pruritus, hives or angioedema → +1; syncope → +3
  2. Score = 7 (max 7); clonality_likely true (Álvarez-Twose 2012 ≥2 threshold)

Male, tryptase 20 μg/L, no cutaneous signs, no syncope (cutoff)

Given: pruritus_hives_angioedema=falsesex=malesyncope_or_presyncope=falsetryptase_ug_l=20

  1. male → +1; tryptase 20 μg/L is 15–25 → 0; absence → +1; no syncope → 0
  2. Score = 2 (max 7); clonality_likely true (published ≥2 threshold)

Also searched as

  • REMA score
  • mast cell clonality score
  • Álvarez-Twose REMA
  • systemic mastocytosis REMA
  • serum baseline tryptase REMA
  • mast cell activation REMA
  • Red Española de Mastocitosis

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/rema?sex=male&tryptase_ug_l=30&pruritus_hives_angioedema=false&syncope_or_presyncope=true

Full URL: https://api.magentlab.com/api/calc/rema?sex=male&tryptase_ug_l=30&pruritus_hives_angioedema=false&syncope_or_presyncope=true

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/rema?sex=male&tryptase_ug_l=30&pruritus_hives_angioedema=false&syncope_or_presyncope=true"

Parameters

Name Type Required Description
sex string required · female, male Sex as assigned by the caller (Álvarez-Twose 2012). male scores +1; female scores −1. Always one of these.
tryptase_ug_l number required Serum baseline tryptase (sBt) in μg/L (1-200). <15 scores −1; 15–25 inclusive scores 0; >25 scores +2. Equal to 15 is not <15; equal to 25 is not >25. magent does not assay tryptase.
pruritus_hives_angioedema boolean required Presence of pruritus, hives or angioedema as assigned by the caller (Álvarez-Twose 2012). true scores −2; false (absence) scores +1. Both branches score. magent does not take a history.
syncope_or_presyncope boolean required Syncope or presyncope as assigned by the caller (Álvarez-Twose 2012). true scores +3; false scores 0.

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.

POST /api/calc/rema Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "pruritus_hives_angioedema": "false",
      "sex": "male",
      "syncope_or_presyncope": "true",
      "tryptase_ug_l": "30"
    },
    {
      "pruritus_hives_angioedema": "false",
      "sex": "male",
      "syncope_or_presyncope": "true",
      "tryptase_ug_l": "30"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/rema",
  "items": [
    {
      "components": [
        {
          "value": "male",
          "factor": "sex",
          "points": 1,
          "present": true
        },
        {
          "value": 30.0,
          "factor": "tryptase_ug_l",
          "points": 2,
          "present": true
        },
        {
          "factor": "pruritus_hives_angioedema",
          "points": 1,
          "present": true
        },
        {
          "factor": "syncope_or_presyncope",
          "points": 3,
          "present": 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": "Alvarez-Twose I, González-de-Olano D, Sánchez-Muñoz L, Matito A, Jara-Acevedo M, Teodosio C, García-Montero A, Morgado JM, Orfao A, Escribano L",
        "doi": "10.1159/000329856",
        "id": "alvarez-twose-2012",
        "pmid": "22042301",
        "source": "Int Arch Allergy Immunol. 2012;157(3):275-280 (Epub 2011 Oct 28)",
        "title": "Validation of the REMA score for predicting mast cell clonality and systemic mastocytosis in patients with systemic mast cell activation symptoms."
      },
      "formula": "rema",
      "formula_expression": "REMA = sex (male +1, female −1) + tryptase_ug_l (<15 −1, 15–25 0, >25 +2) + pruritus_hives_angioedema (true −2, false +1) + syncope_or_presyncope (true +3, false 0); range −4 to +7; clonality_likely iff score >= 2 (Álvarez-Twose 2012)",
      "max_score": 7,
      "score": 7,
      "sex": "male",
      "clonality_likely": true,
      "tryptase_ug_l": 30.0
    },
    {
      "components": [
        {
          "value": "male",
          "factor": "sex",
          "points": 1,
          "present": true
        },
        {
          "value": 30.0,
          "factor": "tryptase_ug_l",
          "points": 2,
          "present": true
        },
        {
          "factor": "pruritus_hives_angioedema",
          "points": 1,
          "present": true
        },
        {
          "factor": "syncope_or_presyncope",
          "points": 3,
          "present": 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": "Alvarez-Twose I, González-de-Olano D, Sánchez-Muñoz L, Matito A, Jara-Acevedo M, Teodosio C, García-Montero A, Morgado JM, Orfao A, Escribano L",
        "doi": "10.1159/000329856",
        "id": "alvarez-twose-2012",
        "pmid": "22042301",
        "source": "Int Arch Allergy Immunol. 2012;157(3):275-280 (Epub 2011 Oct 28)",
        "title": "Validation of the REMA score for predicting mast cell clonality and systemic mastocytosis in patients with systemic mast cell activation symptoms."
      },
      "formula": "rema",
      "formula_expression": "REMA = sex (male +1, female −1) + tryptase_ug_l (<15 −1, 15–25 0, >25 +2) + pruritus_hives_angioedema (true −2, false +1) + syncope_or_presyncope (true +3, false 0); range −4 to +7; clonality_likely iff score >= 2 (Álvarez-Twose 2012)",
      "max_score": 7,
      "score": 7,
      "sex": "male",
      "clonality_likely": true,
      "tryptase_ug_l": 30.0
    }
  ]
}

Response

Field Type Description
formula string rema
formula_expression string Exact Álvarez-Twose 2012 REMA expression used
sex string female or male used
tryptase_ug_l number Serum baseline tryptase used in μg/L
score integer REMA points −4 to +7
max_score integer 7
clonality_likely boolean true iff score ≥ 2 (Álvarez-Twose 2012 REMA threshold). Not a diagnosis of SM. Not WHO SM criteria.
components array Per-factor points
citation object Álvarez-Twose 2012 Int Arch Allergy Immunol citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "value": "male",
      "factor": "sex",
      "points": 1,
      "present": true
    },
    {
      "value": 30.0,
      "factor": "tryptase_ug_l",
      "points": 2,
      "present": true
    },
    {
      "factor": "pruritus_hives_angioedema",
      "points": 1,
      "present": true
    },
    {
      "factor": "syncope_or_presyncope",
      "points": 3,
      "present": 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": "Alvarez-Twose I, González-de-Olano D, Sánchez-Muñoz L, Matito A, Jara-Acevedo M, Teodosio C, García-Montero A, Morgado JM, Orfao A, Escribano L",
    "doi": "10.1159/000329856",
    "id": "alvarez-twose-2012",
    "pmid": "22042301",
    "source": "Int Arch Allergy Immunol. 2012;157(3):275-280 (Epub 2011 Oct 28)",
    "title": "Validation of the REMA score for predicting mast cell clonality and systemic mastocytosis in patients with systemic mast cell activation symptoms."
  },
  "formula": "rema",
  "formula_expression": "REMA = sex (male +1, female −1) + tryptase_ug_l (<15 −1, 15–25 0, >25 +2) + pruritus_hives_angioedema (true −2, false +1) + syncope_or_presyncope (true +3, false 0); range −4 to +7; clonality_likely iff score >= 2 (Álvarez-Twose 2012)",
  "max_score": 7,
  "score": 7,
  "sex": "male",
  "clonality_likely": true,
  "tryptase_ug_l": 30.0
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_rema REMA needs sex, tryptase_ug_l, pruritus_hives_angioedema, and syncope_or_presyncope (Álvarez-Twose 2012). Returned before settlement; you are not charged.
400 invalid_sex sex must be female or male Returned before settlement; you are not charged.
400 invalid_tryptase tryptase_ug_l must be a number from 1 to 200 (μg/L). Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • WHO 2016 SM criteria — 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.

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. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /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.