MAGENT

Hematology · LIVE

IOTA Simple Rules

Apply Timmerman 2008 simple ultrasound-based rules from ten caller-assigned M-rule and B-rule flags and return m_count, b_count, and whether the mass classifies as malignant, benign, or inconclusive.

LIVE $0.005 USDC GET /api/calc/iota

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

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

What it computes

Apply Timmerman 2008 simple ultrasound-based rules from ten caller-assigned M-rule and B-rule flags and return m_count, b_count, and whether the mass classifies as malignant, benign, or inconclusive.

When to use

When an agent already has the ten caller-assigned Timmerman 2008 M-rule and B-rule ultrasound flags and needs the published Simple Rules classification. magent does not read ultrasound. Not a diagnosis of ovarian cancer, not RMI, not Swede, and not the later SRRisk logistic model.

When not to use

  • Not a medical device.
  • Not a diagnosis of ovarian cancer. magent does not diagnose ovarian cancer.
  • Timmerman 2008 Simple Rules only. Not the later SRRisk logistic model. Not RMI. Not Swede.
  • The caller assigns ten ultrasound flags. magent does not read ultrasound or perform Doppler.
  • Rules classify as malignant when one or more M-rules apply and no B-rule applies, and as benign when one or more B-rules apply and no M-rule applies. Otherwise inconclusive. magent does not invent a probability.

Formula

classification malignant iff m_count >= 1 and b_count == 0; benign iff b_count >= 1 and m_count == 0; otherwise inconclusive; m_count counts irregular_solid_tumor, ascites, at_least_four_papillary_structures, irregular_multilocular_solid_ge_100mm, very_high_color_doppler; b_count counts unilocular_cyst, solid_component_lt_7mm, acoustic_shadows, smooth_multilocular_lt_100mm, no_detectable_blood_flow (Timmerman 2008 Simple Rules; not SRRisk)

Citation

Title
Simple ultrasound-based rules for the diagnosis of ovarian cancer.
Authors
Timmerman D, Testa AC, Bourne T, Ameye L, Jurkovic D, Van Holsbeke C, Paladini D, Van Calster B, Vergote I, Van Huffel S, Valentin L
Source
Ultrasound Obstet Gynecol. 2008;31(6):681-690
DOI
10.1002/uog.5365

Worked example

Ascites only (malignant)

Given: acoustic_shadows=falseascites=trueat_least_four_papillary_structures=falseirregular_multilocular_solid_ge_100mm=falseirregular_solid_tumor=falseno_detectable_blood_flow=falsesmooth_multilocular_lt_100mm=falsesolid_component_lt_7mm=falseunilocular_cyst=falsevery_high_color_doppler=false

  1. Ascites is true; the other four M-rules are false (m_count 1)
  2. All five B-rules are false (b_count 0)
  3. m_count >= 1 and b_count == 0 → classification malignant

No M-rules or B-rules (inconclusive)

Given: acoustic_shadows=falseascites=falseat_least_four_papillary_structures=falseirregular_multilocular_solid_ge_100mm=falseirregular_solid_tumor=falseno_detectable_blood_flow=falsesmooth_multilocular_lt_100mm=falsesolid_component_lt_7mm=falseunilocular_cyst=falsevery_high_color_doppler=false

  1. All ten flags are false (m_count 0, b_count 0)
  2. Neither M-rules nor B-rules apply → classification inconclusive

Also searched as

  • IOTA Simple Rules
  • Timmerman 2008 simple rules
  • simple ultrasound-based rules
  • ovarian M-rules B-rules
  • ovarian ultrasound simple rules
  • Timmerman ovarian rules

Try

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

/api/calc/iota?irregular_solid_tumor=false&ascites=true&at_least_four_papillary_structures=false&irregular_multilocular_solid_ge_100mm=false&very_high_color_doppler=false&unilocular_cyst=false&solid_component_lt_7mm=false&acoustic_shadows=false&smooth_multilocular_lt_100mm=false&no_detectable_blood_flow=false

Full URL: https://api.magentlab.com/api/calc/iota?irregular_solid_tumor=false&ascites=true&at_least_four_papillary_structures=false&irregular_multilocular_solid_ge_100mm=false&very_high_color_doppler=false&unilocular_cyst=false&solid_component_lt_7mm=false&acoustic_shadows=false&smooth_multilocular_lt_100mm=false&no_detectable_blood_flow=false

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/iota?irregular_solid_tumor=false&ascites=true&at_least_four_papillary_structures=false&irregular_multilocular_solid_ge_100mm=false&very_high_color_doppler=false&unilocular_cyst=false&solid_component_lt_7mm=false&acoustic_shadows=false&smooth_multilocular_lt_100mm=false&no_detectable_blood_flow=false"

Parameters

Name Type Required Description
irregular_solid_tumor boolean required Irregular solid tumor (M-rule). true or false as assigned by the caller (Timmerman 2008). magent does not read ultrasound.
ascites boolean required Ascites (M-rule). true or false as assigned by the caller. magent does not read ultrasound.
at_least_four_papillary_structures boolean required At least four papillary structures (M-rule). true or false as assigned by the caller. magent does not read ultrasound.
irregular_multilocular_solid_ge_100mm boolean required Irregular multilocular-solid tumor with largest diameter ≥100 mm (M-rule). true or false as assigned by the caller. magent does not measure the mass.
very_high_color_doppler boolean required Very high color content on color Doppler (M-rule). true or false as assigned by the caller. magent does not perform Doppler.
unilocular_cyst boolean required Unilocular cyst (B-rule). true or false as assigned by the caller. magent does not read ultrasound.
solid_component_lt_7mm boolean required Solid components with largest solid component <7 mm (B-rule). true or false as assigned by the caller. magent does not measure the mass.
acoustic_shadows boolean required Acoustic shadows (B-rule). true or false as assigned by the caller. magent does not read ultrasound.
smooth_multilocular_lt_100mm boolean required Smooth multilocular tumor <100 mm largest diameter (B-rule). true or false as assigned by the caller. magent does not measure the mass.
no_detectable_blood_flow boolean required No detectable blood flow on Doppler (B-rule). true or false as assigned by the caller. magent does not perform Doppler.

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/iota 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": [
    {
      "acoustic_shadows": "false",
      "ascites": "true",
      "at_least_four_papillary_structures": "false",
      "irregular_multilocular_solid_ge_100mm": "false",
      "irregular_solid_tumor": "false",
      "no_detectable_blood_flow": "false",
      "smooth_multilocular_lt_100mm": "false",
      "solid_component_lt_7mm": "false",
      "unilocular_cyst": "false",
      "very_high_color_doppler": "false"
    },
    {
      "acoustic_shadows": "false",
      "ascites": "true",
      "at_least_four_papillary_structures": "false",
      "irregular_multilocular_solid_ge_100mm": "false",
      "irregular_solid_tumor": "false",
      "no_detectable_blood_flow": "false",
      "smooth_multilocular_lt_100mm": "false",
      "solid_component_lt_7mm": "false",
      "unilocular_cyst": "false",
      "very_high_color_doppler": "false"
    }
  ]
}

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/iota",
  "items": [
    {
      "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": "Timmerman D, Testa AC, Bourne T, Ameye L, Jurkovic D, Van Holsbeke C, Paladini D, Van Calster B, Vergote I, Van Huffel S, Valentin L",
        "doi": "10.1002/uog.5365",
        "id": "timmerman-2008",
        "pmid": "18504770",
        "source": "Ultrasound Obstet Gynecol. 2008;31(6):681-690",
        "title": "Simple ultrasound-based rules for the diagnosis of ovarian cancer."
      },
      "formula": "iota",
      "formula_expression": "classification malignant iff m_count >= 1 and b_count == 0; benign iff b_count >= 1 and m_count == 0; otherwise inconclusive; m_count counts irregular_solid_tumor, ascites, at_least_four_papillary_structures, irregular_multilocular_solid_ge_100mm, very_high_color_doppler; b_count counts unilocular_cyst, solid_component_lt_7mm, acoustic_shadows, smooth_multilocular_lt_100mm, no_detectable_blood_flow (Timmerman 2008 Simple Rules; not SRRisk)",
      "criteria": [
        {
          "factor": "irregular_solid_tumor",
          "met": false
        },
        {
          "factor": "ascites",
          "met": true
        },
        {
          "factor": "at_least_four_papillary_structures",
          "met": false
        },
        {
          "factor": "irregular_multilocular_solid_ge_100mm",
          "met": false
        },
        {
          "factor": "very_high_color_doppler",
          "met": false
        },
        {
          "factor": "unilocular_cyst",
          "met": false
        },
        {
          "factor": "solid_component_lt_7mm",
          "met": false
        },
        {
          "factor": "acoustic_shadows",
          "met": false
        },
        {
          "factor": "smooth_multilocular_lt_100mm",
          "met": false
        },
        {
          "factor": "no_detectable_blood_flow",
          "met": false
        }
      ],
      "classification": "malignant",
      "b_count": 0,
      "m_count": 1
    },
    {
      "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": "Timmerman D, Testa AC, Bourne T, Ameye L, Jurkovic D, Van Holsbeke C, Paladini D, Van Calster B, Vergote I, Van Huffel S, Valentin L",
        "doi": "10.1002/uog.5365",
        "id": "timmerman-2008",
        "pmid": "18504770",
        "source": "Ultrasound Obstet Gynecol. 2008;31(6):681-690",
        "title": "Simple ultrasound-based rules for the diagnosis of ovarian cancer."
      },
      "formula": "iota",
      "formula_expression": "classification malignant iff m_count >= 1 and b_count == 0; benign iff b_count >= 1 and m_count == 0; otherwise inconclusive; m_count counts irregular_solid_tumor, ascites, at_least_four_papillary_structures, irregular_multilocular_solid_ge_100mm, very_high_color_doppler; b_count counts unilocular_cyst, solid_component_lt_7mm, acoustic_shadows, smooth_multilocular_lt_100mm, no_detectable_blood_flow (Timmerman 2008 Simple Rules; not SRRisk)",
      "criteria": [
        {
          "factor": "irregular_solid_tumor",
          "met": false
        },
        {
          "factor": "ascites",
          "met": true
        },
        {
          "factor": "at_least_four_papillary_structures",
          "met": false
        },
        {
          "factor": "irregular_multilocular_solid_ge_100mm",
          "met": false
        },
        {
          "factor": "very_high_color_doppler",
          "met": false
        },
        {
          "factor": "unilocular_cyst",
          "met": false
        },
        {
          "factor": "solid_component_lt_7mm",
          "met": false
        },
        {
          "factor": "acoustic_shadows",
          "met": false
        },
        {
          "factor": "smooth_multilocular_lt_100mm",
          "met": false
        },
        {
          "factor": "no_detectable_blood_flow",
          "met": false
        }
      ],
      "classification": "malignant",
      "b_count": 0,
      "m_count": 1
    }
  ]
}

Response

Field Type Description
formula string iota
formula_expression string Timmerman 2008 Simple Rules: malignant if any M-rule and no B-rule; benign if any B-rule and no M-rule; otherwise inconclusive
classification string malignant, benign, or inconclusive. Not a diagnosis of ovarian cancer. Not RMI. Not Swede. Not SRRisk.
m_count integer Count of true M-rules among irregular solid tumor, ascites, at least four papillary structures, irregular multilocular-solid ≥100 mm, and very high color Doppler (0-5)
b_count integer Count of true B-rules among unilocular cyst, solid component <7 mm, acoustic shadows, smooth multilocular <100 mm, and no detectable blood flow (0-5)
criteria array Per-flag rows with factor and met for each of the ten M-rules and B-rules
citation object Timmerman 2008 Ultrasound Obstet Gynecol citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "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": "Timmerman D, Testa AC, Bourne T, Ameye L, Jurkovic D, Van Holsbeke C, Paladini D, Van Calster B, Vergote I, Van Huffel S, Valentin L",
    "doi": "10.1002/uog.5365",
    "id": "timmerman-2008",
    "pmid": "18504770",
    "source": "Ultrasound Obstet Gynecol. 2008;31(6):681-690",
    "title": "Simple ultrasound-based rules for the diagnosis of ovarian cancer."
  },
  "formula": "iota",
  "formula_expression": "classification malignant iff m_count >= 1 and b_count == 0; benign iff b_count >= 1 and m_count == 0; otherwise inconclusive; m_count counts irregular_solid_tumor, ascites, at_least_four_papillary_structures, irregular_multilocular_solid_ge_100mm, very_high_color_doppler; b_count counts unilocular_cyst, solid_component_lt_7mm, acoustic_shadows, smooth_multilocular_lt_100mm, no_detectable_blood_flow (Timmerman 2008 Simple Rules; not SRRisk)",
  "criteria": [
    {
      "factor": "irregular_solid_tumor",
      "met": false
    },
    {
      "factor": "ascites",
      "met": true
    },
    {
      "factor": "at_least_four_papillary_structures",
      "met": false
    },
    {
      "factor": "irregular_multilocular_solid_ge_100mm",
      "met": false
    },
    {
      "factor": "very_high_color_doppler",
      "met": false
    },
    {
      "factor": "unilocular_cyst",
      "met": false
    },
    {
      "factor": "solid_component_lt_7mm",
      "met": false
    },
    {
      "factor": "acoustic_shadows",
      "met": false
    },
    {
      "factor": "smooth_multilocular_lt_100mm",
      "met": false
    },
    {
      "factor": "no_detectable_blood_flow",
      "met": false
    }
  ],
  "classification": "malignant",
  "b_count": 0,
  "m_count": 1
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_iota IOTA Simple Rules need ten caller-assigned M and B ultrasound flags (Timmerman 2008). 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

  • RMI — Compute the Jacobs 1990 risk of malignancy index as ultrasound score × menopausal score × CA125 (U/ml), then whether that product exceeds the published cutoff of 200.
  • Swede score — Sum five caller-assigned Strander 2005 Swede integers (acetowhiteness, margins_surface, vessels, lesion_size, iodine; each 0-2; max 10) and return the published total and <5 / 5-7 / >=8 bands.

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.