MAGENT

Respiratory · LIVE

LENT score (malignant pleural effusion)

LENT

Sum the Clive 2014 Table 3 LENT score (pleural fluid LDH, ECOG, serum NLR, tumour type) and return low (0-1), moderate (2-4), or high (5-7).

LIVE $0.005 USDC GET /api/calc/lent

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

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

What it computes

Sum the Clive 2014 Table 3 LENT score (pleural fluid LDH, ECOG, serum NLR, tumour type) and return low (0-1), moderate (2-4), or high (5-7).

When to use

When an agent already has pleural fluid LDH, a caller-assigned ECOG 0-4, a serum NLR number, and a Clive tumour token, and must not invent a diagnosis, treatment order, or survival assignment. magent does not observe the patient or compute NLR from percents.

When not to use

  • Not a medical device and not a diagnosis or treatment order. magent does not observe the patient.
  • Clive 2014 Table 3 writes <1500 vs >1500 and <9 vs >9 with no equals. LDH 1500 and NLR 9 are not scored.
  • Median survivals 319 / 130 / 44 days are Clive 2014 paper numbers only, not a prognosis assignment.
  • Oken 1982 ECOG 0-4 only. Grade 5 (dead) is not scored. The caller assigns ecog; magent does not convert Karnofsky.
  • nlr is a number. magent does not compute NLR from neutrophil or lymphocyte percents.

Formula

LENT = L (pleural LDH IU/L: <1500 → 0, >1500 → 1) + E (ECOG 0→0, 1→1, 2→2, 3-4→3) + N (serum NLR: <9 → 0, >9 → 1) + T (mesothelioma/haematological → 0; breast/gynaecological/renal_cell → 1; lung/other → 2); Clive 2014 Table 3; max 7; 0-1 low, 2-4 moderate, 5-7 high

Citation

Title
Predicting survival in malignant pleural effusion: development and validation of the LENT prognostic score
Authors
Clive AO, Kahan BC, Hooper CE, Bhatnagar R, Morley AJ, Zahan-Evans N, Bintcliffe OJ, Boshuizen RC, Fysh ETH, Tobin CL, Medford ARL, Harvey JE, van den Heuvel MM, Lee YCG, Maskell NA
Source
Thorax. 2014;69(12):1098-1104
DOI
10.1136/thoraxjnl-2014-205285

Worked example

LDH 1000, ECOG 0, NLR 5, mesothelioma

Given: ecog=0nlr=5pleural_ldh_u_l=1000tumor_type=mesothelioma

  1. L: pleural LDH 1000 < 1500 → 0
  2. E: ECOG 0 → 0
  3. N: NLR 5 < 9 → 0
  4. T: mesothelioma → 0
  5. score = 0 (max 7); risk = low

LDH 1000, ECOG 4, NLR 5, lung

Given: ecog=4nlr=5pleural_ldh_u_l=1000tumor_type=lung

  1. L: 1000 < 1500 → 0; E: ECOG 4 → 3; N: 5 < 9 → 0; T: lung → 2
  2. score = 5 (max 7); risk = high

Also searched as

  • LENT score
  • LENT prognostic score
  • malignant pleural effusion score
  • Clive LENT
  • pleural LDH ECOG NLR
  • MPE LENT
  • LENT survival score

Try

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

/api/calc/lent?pleural_ldh_u_l=1000&ecog=0&nlr=5&tumor_type=mesothelioma

Full URL: https://api.magentlab.com/api/calc/lent?pleural_ldh_u_l=1000&ecog=0&nlr=5&tumor_type=mesothelioma

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/lent?pleural_ldh_u_l=1000&ecog=0&nlr=5&tumor_type=mesothelioma"

Parameters

Name Type Required Description
pleural_ldh_u_l number required Pleural fluid LDH in IU/L (1-20000, not 1500). Clive 2014 Table 3: <1500 scores 0, >1500 scores 1. Equality at 1500 is not scored.
ecog integer required Oken 1982 ECOG performance status 0-4 as assigned by the caller. Clive 2014: 0→0, 1→1, 2→2, 3-4→3. Grade 5 (dead) is not scored. magent does not observe the patient.
nlr number required Serum neutrophil-to-lymphocyte ratio as a number (0.05-200, not 9). Clive 2014 Table 3: <9 scores 0, >9 scores 1. Equality at 9 is not scored. Pass nlr; magent does not compute it from percents.
tumor_type string required · mesothelioma, haematological, breast, gynaecological, renal_cell, lung, other Clive 2014 tumour type. mesothelioma or haematological (also hematological) scores 0; breast, gynaecological (also gynecological), or renal_cell scores 1; lung or other scores 2. magent does not assign tumour type from histology text.

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/lent 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": [
    {
      "ecog": "0",
      "nlr": "5",
      "pleural_ldh_u_l": "1000",
      "tumor_type": "mesothelioma"
    },
    {
      "ecog": "0",
      "nlr": "5",
      "pleural_ldh_u_l": "1000",
      "tumor_type": "mesothelioma"
    }
  ]
}

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/lent",
  "items": [
    {
      "components": [
        {
          "value": 1.0e3,
          "factor": "pleural_ldh",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "ecog",
          "points": 0,
          "present": true
        },
        {
          "value": 5.0,
          "factor": "nlr",
          "points": 0,
          "present": false
        },
        {
          "value": "mesothelioma",
          "factor": "tumor_type",
          "points": 0,
          "present": false
        }
      ],
      "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": "Clive AO, Kahan BC, Hooper CE, Bhatnagar R, Morley AJ, Zahan-Evans N, Bintcliffe OJ, Boshuizen RC, Fysh ETH, Tobin CL, Medford ARL, Harvey JE, van den Heuvel MM, Lee YCG, Maskell NA",
        "doi": "10.1136/thoraxjnl-2014-205285",
        "id": "clive-2014",
        "pmid": "25100651",
        "source": "Thorax. 2014;69(12):1098-1104",
        "title": "Predicting survival in malignant pleural effusion: development and validation of the LENT prognostic score"
      },
      "formula": "lent",
      "formula_expression": "LENT = L (pleural LDH IU/L: <1500 → 0, >1500 → 1) + E (ECOG 0→0, 1→1, 2→2, 3-4→3) + N (serum NLR: <9 → 0, >9 → 1) + T (mesothelioma/haematological → 0; breast/gynaecological/renal_cell → 1; lung/other → 2); Clive 2014 Table 3; max 7; 0-1 low, 2-4 moderate, 5-7 high",
      "max_score": 7,
      "score": 0,
      "ecog": 0,
      "pleural_ldh_u_l": 1.0e3,
      "nlr": 5.0,
      "risk": "low",
      "tumor_type": "mesothelioma"
    },
    {
      "components": [
        {
          "value": 1.0e3,
          "factor": "pleural_ldh",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "ecog",
          "points": 0,
          "present": true
        },
        {
          "value": 5.0,
          "factor": "nlr",
          "points": 0,
          "present": false
        },
        {
          "value": "mesothelioma",
          "factor": "tumor_type",
          "points": 0,
          "present": false
        }
      ],
      "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": "Clive AO, Kahan BC, Hooper CE, Bhatnagar R, Morley AJ, Zahan-Evans N, Bintcliffe OJ, Boshuizen RC, Fysh ETH, Tobin CL, Medford ARL, Harvey JE, van den Heuvel MM, Lee YCG, Maskell NA",
        "doi": "10.1136/thoraxjnl-2014-205285",
        "id": "clive-2014",
        "pmid": "25100651",
        "source": "Thorax. 2014;69(12):1098-1104",
        "title": "Predicting survival in malignant pleural effusion: development and validation of the LENT prognostic score"
      },
      "formula": "lent",
      "formula_expression": "LENT = L (pleural LDH IU/L: <1500 → 0, >1500 → 1) + E (ECOG 0→0, 1→1, 2→2, 3-4→3) + N (serum NLR: <9 → 0, >9 → 1) + T (mesothelioma/haematological → 0; breast/gynaecological/renal_cell → 1; lung/other → 2); Clive 2014 Table 3; max 7; 0-1 low, 2-4 moderate, 5-7 high",
      "max_score": 7,
      "score": 0,
      "ecog": 0,
      "pleural_ldh_u_l": 1.0e3,
      "nlr": 5.0,
      "risk": "low",
      "tumor_type": "mesothelioma"
    }
  ]
}

Response

Field Type Description
formula string lent
formula_expression string Clive 2014 Table 3 LENT rule
score integer LENT points 0-7
max_score integer 7
risk string low when score is 0-1, moderate when 2-4, high when 5-7 (Clive 2014). Not a diagnosis or treatment order. Paper median survivals 319 / 130 / 44 days are table numbers only.
pleural_ldh_u_l number Pleural fluid LDH used, IU/L
ecog integer Caller-assigned Oken 1982 ECOG grade 0-4
nlr number Serum NLR used (caller-supplied number)
tumor_type string Canonical Clive 2014 tumour token used for T
components array L, E, N, and T points
citation object Clive 2014 Thorax citation
disclaimer string Not a medical device

Example JSON

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

{
  "components": [
    {
      "value": 1.0e3,
      "factor": "pleural_ldh",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "ecog",
      "points": 0,
      "present": true
    },
    {
      "value": 5.0,
      "factor": "nlr",
      "points": 0,
      "present": false
    },
    {
      "value": "mesothelioma",
      "factor": "tumor_type",
      "points": 0,
      "present": false
    }
  ],
  "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": "Clive AO, Kahan BC, Hooper CE, Bhatnagar R, Morley AJ, Zahan-Evans N, Bintcliffe OJ, Boshuizen RC, Fysh ETH, Tobin CL, Medford ARL, Harvey JE, van den Heuvel MM, Lee YCG, Maskell NA",
    "doi": "10.1136/thoraxjnl-2014-205285",
    "id": "clive-2014",
    "pmid": "25100651",
    "source": "Thorax. 2014;69(12):1098-1104",
    "title": "Predicting survival in malignant pleural effusion: development and validation of the LENT prognostic score"
  },
  "formula": "lent",
  "formula_expression": "LENT = L (pleural LDH IU/L: <1500 → 0, >1500 → 1) + E (ECOG 0→0, 1→1, 2→2, 3-4→3) + N (serum NLR: <9 → 0, >9 → 1) + T (mesothelioma/haematological → 0; breast/gynaecological/renal_cell → 1; lung/other → 2); Clive 2014 Table 3; max 7; 0-1 low, 2-4 moderate, 5-7 high",
  "max_score": 7,
  "score": 0,
  "ecog": 0,
  "pleural_ldh_u_l": 1.0e3,
  "nlr": 5.0,
  "risk": "low",
  "tumor_type": "mesothelioma"
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_lent_ldh pleural_ldh_u_l must be a number from 1 to 20000 and not 1500 (Clive 2014 LENT uses <1500 vs >1500). Returned before settlement; you are not charged.
400 invalid_ecog_ps ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.
400 invalid_lent_nlr nlr must be a number from 0.05 to 200 and not 9 (Clive 2014 LENT uses <9 vs >9). Returned before settlement; you are not charged.
400 invalid_lent_tumor tumor_type must be mesothelioma, haematological, breast, gynaecological, renal_cell, lung, or other (Clive 2014 LENT). 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

  • Light's criteria — Apply Light 1972 pleural fluid criteria from protein ratio, LDH ratio, and pleural LDH versus two-thirds the laboratory LDH upper limit of normal.
  • NLR — Compute the Zahorec 2001 neutrophil-to-lymphocyte ratio from relative neutrophil and lymphocyte percents.
  • ECOG — Return the Oken 1982 ECOG performance status grade 0-4 from a caller-assigned integer, with a stable label.

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.