MAGENT

Emergency · LIVE

POSSUM surgical audit

POSSUM

Sum Copeland 1991 Table 1 physiologic and Table 2 operative severity items, then return the published morbidity and mortality probabilities from the unrounded logits.

LIVE $0.005 USDC GET /api/calc/possum

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

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

What it computes

Sum Copeland 1991 Table 1 physiologic and Table 2 operative severity items, then return the published morbidity and mortality probabilities from the unrounded logits.

When to use

When an agent needs the original POSSUM audit scores and logits and must not substitute P-POSSUM (Whiteley), invent risk classes, or issue operative consent.

When not to use

  • Not a medical device. Not a diagnosis. Not an operative-consent tool. magent does not examine the patient.
  • Copeland 1991 Tables 1-2 and the original morbidity and mortality logits only. This is not P-POSSUM (Whiteley).
  • Age has no 8-point cell; ECG, multiple_procedures, and mode_of_surgery have no 2-point cell. magent does not cap the integer below the sum of published item maxima.
  • Each band is caller-assigned. magent does not interpret an ECG tracing or classify an operative note.
  • Estimated percents are population audit probabilities from the unrounded logits, not an individual outcome.

Formula

physiologic_score = sum of 12 Copeland 1991 Table 1 items (1/2/4/8; age has no 8, ECG has no 2); operative_score = sum of 6 Table 2 items (1/2/4/8; multiple_procedures and mode_of_surgery have no 2); ln[R/(1-R)] morbidity = -5.91 + 0.16*physiologic_score + 0.19*operative_score; ln[R/(1-R)] mortality = -7.04 + 0.13*physiologic_score + 0.16*operative_score; estimated_morbidity_percent and estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit

Citation

Title
POSSUM: a scoring system for surgical audit
Authors
Copeland GP, Jones D, Walters M
Source
Br J Surg. 1991;78(3):355-360
DOI
10.1002/bjs.1800780327

Worked example

All lowest Table 1 and Table 2 poles

Given: age_years=50blood_loss_ml=50cardiac=no_failureecg=normalgcs=15hemoglobin_g_dl=14malignancy=nonemode_of_surgery=electivemultiple_procedures=oneoperative_severity=minorperitoneal_soiling=nonepotassium_mmol_l=4.0pulse=70respiratory=no_dyspneasodium_mmol_l=140systolic_bp_mm_hg=120urea_mmol_l=5wbc_k_ul=8

  1. Each of 12 Table 1 items is 1 (age 50, no_failure, no_dyspnea, SBP 120, pulse 70, GCS 15, Hb 14, WBC 8, urea 5, Na 140, K 4.0, ECG normal)
  2. Each of 6 Table 2 items is 1 (minor, one procedure, blood loss 50, soiling none, malignancy none, elective)
  3. physiologic_score = 12; operative_score = 6
  4. morbidity logit = -5.91 + 0.16×12 + 0.19×6 = -2.85
  5. mortality logit = -7.04 + 0.13×12 + 0.16×6 = -4.52
  6. percents = 100 × exp(logit)/(1+exp(logit)) from the unrounded logits

All Table 1 and Table 2 item maxima

Given: age_years=80blood_loss_ml=1500cardiac=raised_jvp_or_cardiomegalyecg=other_abnormal_or_ectopics_or_q_st_tgcs=5hemoglobin_g_dl=8malignancy=distant_metastasesmode_of_surgery=immediate_lt_2hmultiple_procedures=more_than_twooperative_severity=major_plusperitoneal_soiling=free_bowel_pus_bloodpotassium_mmol_l=2.5pulse=30respiratory=rest_or_fibrosis_consolidationsodium_mmol_l=120systolic_bp_mm_hg=80urea_mmol_l=20wbc_k_ul=2

  1. Age ≥71 → 4; the other 11 Table 1 items are 8
  2. Each of 6 Table 2 items is 8
  3. physiologic_score = 92; operative_score = 48
  4. percents from the unrounded Copeland logits

Also searched as

  • POSSUM
  • Copeland POSSUM
  • physiologic and operative severity score
  • surgical audit score
  • POSSUM morbidity mortality
  • Copeland surgical score
  • POSSUM physiologic score

Try

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

/api/calc/possum?age_years=50&cardiac=no_failure&respiratory=no_dyspnea&systolic_bp_mm_hg=120&pulse=70&gcs=15&hemoglobin_g_dl=14&wbc_k_ul=8&urea_mmol_l=5&sodium_mmol_l=140&potassium_mmol_l=4.0&ecg=normal&operative_severity=minor&multiple_procedures=one&blood_loss_ml=50&peritoneal_soiling=none&malignancy=none&mode_of_surgery=elective

Full URL: https://api.magentlab.com/api/calc/possum?age_years=50&cardiac=no_failure&respiratory=no_dyspnea&systolic_bp_mm_hg=120&pulse=70&gcs=15&hemoglobin_g_dl=14&wbc_k_ul=8&urea_mmol_l=5&sodium_mmol_l=140&potassium_mmol_l=4.0&ecg=normal&operative_severity=minor&multiple_procedures=one&blood_loss_ml=50&peritoneal_soiling=none&malignancy=none&mode_of_surgery=elective

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/possum?age_years=50&cardiac=no_failure&respiratory=no_dyspnea&systolic_bp_mm_hg=120&pulse=70&gcs=15&hemoglobin_g_dl=14&wbc_k_ul=8&urea_mmol_l=5&sodium_mmol_l=140&potassium_mmol_l=4.0&ecg=normal&operative_severity=minor&multiple_procedures=one&blood_loss_ml=50&peritoneal_soiling=none&malignancy=none&mode_of_surgery=elective"

Parameters

Name Type Required Description
age_years integer required Age in years, integer 16-120 (Copeland 1991 Table 1). ≤60 → 1; 61-70 → 2; ≥71 → 4. No 8-point cell.
cardiac string required · no_failure, diuretic_digoxin_antianginal_or_hypertensive, peripheral_edema_warfarin_or_borderline_cardiomegaly, raised_jvp_or_cardiomegaly Copeland 1991 cardiac signs as assigned by the caller: no_failure (1); diuretic_digoxin_antianginal_or_hypertensive (2); peripheral_edema_warfarin_or_borderline_cardiomegaly (4); raised_jvp_or_cardiomegaly (8). magent does not examine the patient.
respiratory string required · no_dyspnea, exertional_or_mild_coad, limiting_or_moderate_coad, rest_or_fibrosis_consolidation Copeland 1991 respiratory history as assigned by the caller: no_dyspnea (1); exertional_or_mild_coad (2); limiting_or_moderate_coad (4); rest_or_fibrosis_consolidation (8). magent does not examine the patient.
systolic_bp_mm_hg number required Systolic blood pressure in mm Hg (20-300). 110-130 → 1; 100-109 or 131-170 → 2; 90-99 or ≥171 → 4; ≤89 → 8. magent does not measure blood pressure.
pulse integer required Pulse in beats/min, integer 20-250. 50-80 → 1; 81-100 → 2; 40-49 or 101-120 → 4; ≤39 or ≥121 → 8. magent does not measure pulse.
gcs integer required Glasgow Coma Scale total as assigned by the caller, integer 3-15. 15 → 1; 12-14 → 2; 9-11 → 4; ≤8 → 8. magent does not examine the patient.
hemoglobin_g_dl number required Haemoglobin in g/dL (3-25). 13-16 → 1; 11.5-12.9 or 16.1-17.0 → 2; 10.0-11.4 or 17.1-18.0 → 4; ≤9.9 or ≥18.1 → 8.
wbc_k_ul number required White cell count in ×10^9/L (0.1-100). 4.0-10.0 → 1; 10.1-20.0 or 3.1-3.9 → 2; ≥20.1 → 4; ≤3.0 → 8. Table 1 lists 3.1-4.0 on the 2-point cell; 4.0 is scored in the 1-point band.
urea_mmol_l number required Serum urea in mmol/L (0.5-80). ≤7.5 → 1; 7.6-10.0 → 2; 10.1-15.0 → 4; ≥15.1 → 8.
sodium_mmol_l number required Serum sodium in mmol/L (90-200). ≥136 → 1; 131-135 → 2; 126-130 → 4; ≤125 → 8.
potassium_mmol_l number required Serum potassium in mmol/L (1-12). 3.5-5.0 → 1; 3.2-3.4 or 5.1-5.3 → 2; 2.9-3.1 or 5.4-5.9 → 4; ≤2.8 or ≥6.0 → 8.
ecg string required · normal, atrial_fibrillation_60_90, other_abnormal_or_ectopics_or_q_st_t Copeland 1991 electrocardiogram as assigned by the caller: normal (1); atrial_fibrillation_60_90 (4); other_abnormal_or_ectopics_or_q_st_t (8). No 2-point cell. magent does not interpret a tracing.
operative_severity string required · minor, moderate, major, major_plus Copeland 1991 Table 2 operative severity as assigned by the caller: minor (1); moderate (2); major (4); major_plus (8). magent does not classify an operative note.
multiple_procedures string required · one, two, more_than_two Number of procedures as assigned by the caller: one (1); two (4); more_than_two (8). No 2-point cell.
blood_loss_ml number required Total blood loss in mL (0-20000). ≤100 → 1; 101-500 → 2; 501-999 → 4; ≥1000 → 8. Table 2 writes <100 then 101-500; 100 mL is scored with the lowest band.
peritoneal_soiling string required · none, minor_serous, local_pus, free_bowel_pus_blood Copeland 1991 peritoneal soiling as assigned by the caller: none (1); minor_serous (2); local_pus (4); free_bowel_pus_blood (8). magent does not examine the patient.
malignancy string required · none, primary_only, nodal_metastases, distant_metastases Copeland 1991 presence of malignancy as assigned by the caller: none (1); primary_only (2); nodal_metastases (4); distant_metastases (8). magent does not diagnose.
mode_of_surgery string required · elective, emergency_resuscitation_gt_2h_or_lt_24h, immediate_lt_2h Copeland 1991 mode of surgery as assigned by the caller: elective (1); emergency_resuscitation_gt_2h_or_lt_24h (4); immediate_lt_2h (8). No 2-point cell.

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/possum 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": [
    {
      "age_years": "50",
      "blood_loss_ml": "50",
      "cardiac": "no_failure",
      "ecg": "normal",
      "gcs": "15",
      "hemoglobin_g_dl": "14",
      "malignancy": "none",
      "mode_of_surgery": "elective",
      "multiple_procedures": "one",
      "operative_severity": "minor",
      "peritoneal_soiling": "none",
      "potassium_mmol_l": "4.0",
      "pulse": "70",
      "respiratory": "no_dyspnea",
      "sodium_mmol_l": "140",
      "systolic_bp_mm_hg": "120",
      "urea_mmol_l": "5",
      "wbc_k_ul": "8"
    },
    {
      "age_years": "50",
      "blood_loss_ml": "50",
      "cardiac": "no_failure",
      "ecg": "normal",
      "gcs": "15",
      "hemoglobin_g_dl": "14",
      "malignancy": "none",
      "mode_of_surgery": "elective",
      "multiple_procedures": "one",
      "operative_severity": "minor",
      "peritoneal_soiling": "none",
      "potassium_mmol_l": "4.0",
      "pulse": "70",
      "respiratory": "no_dyspnea",
      "sodium_mmol_l": "140",
      "systolic_bp_mm_hg": "120",
      "urea_mmol_l": "5",
      "wbc_k_ul": "8"
    }
  ]
}

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/possum",
  "items": [
    {
      "components": [
        {
          "value": 50,
          "factor": "age_years",
          "points": 1,
          "present": true
        },
        {
          "value": "no_failure",
          "factor": "cardiac",
          "points": 1,
          "present": true
        },
        {
          "value": "no_dyspnea",
          "factor": "respiratory",
          "points": 1,
          "present": true
        },
        {
          "value": 120.0,
          "factor": "systolic_bp_mm_hg",
          "points": 1,
          "present": true
        },
        {
          "value": 70,
          "factor": "pulse",
          "points": 1,
          "present": true
        },
        {
          "value": 15,
          "factor": "gcs",
          "points": 1,
          "present": true
        },
        {
          "value": 14.0,
          "factor": "hemoglobin_g_dl",
          "points": 1,
          "present": true
        },
        {
          "value": 8.0,
          "factor": "wbc_k_ul",
          "points": 1,
          "present": true
        },
        {
          "value": 5.0,
          "factor": "urea_mmol_l",
          "points": 1,
          "present": true
        },
        {
          "value": 140.0,
          "factor": "sodium_mmol_l",
          "points": 1,
          "present": true
        },
        {
          "value": 4.0,
          "factor": "potassium_mmol_l",
          "points": 1,
          "present": true
        },
        {
          "value": "normal",
          "factor": "ecg",
          "points": 1,
          "present": true
        },
        {
          "value": "minor",
          "factor": "operative_severity",
          "points": 1,
          "present": true
        },
        {
          "value": "one",
          "factor": "multiple_procedures",
          "points": 1,
          "present": true
        },
        {
          "value": 50.0,
          "factor": "blood_loss_ml",
          "points": 1,
          "present": true
        },
        {
          "value": "none",
          "factor": "peritoneal_soiling",
          "points": 1,
          "present": true
        },
        {
          "value": "none",
          "factor": "malignancy",
          "points": 1,
          "present": true
        },
        {
          "value": "elective",
          "factor": "mode_of_surgery",
          "points": 1,
          "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": "Copeland GP, Jones D, Walters M",
        "doi": "10.1002/bjs.1800780327",
        "id": "copeland-1991",
        "pmid": "2021856",
        "source": "Br J Surg. 1991;78(3):355-360",
        "title": "POSSUM: a scoring system for surgical audit"
      },
      "formula": "possum",
      "formula_expression": "physiologic_score = sum of 12 Copeland 1991 Table 1 items (1/2/4/8; age has no 8, ECG has no 2); operative_score = sum of 6 Table 2 items (1/2/4/8; multiple_procedures and mode_of_surgery have no 2); ln[R/(1-R)] morbidity = -5.91 + 0.16*physiologic_score + 0.19*operative_score; ln[R/(1-R)] mortality = -7.04 + 0.13*physiologic_score + 0.16*operative_score; estimated_morbidity_percent and estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit",
      "estimated_morbidity_percent": 5.47,
      "estimated_mortality_percent": 1.08,
      "morbidity_logit": -2.85,
      "mortality_logit": -4.52,
      "operative_score": 6,
      "physiologic_score": 12
    },
    {
      "components": [
        {
          "value": 50,
          "factor": "age_years",
          "points": 1,
          "present": true
        },
        {
          "value": "no_failure",
          "factor": "cardiac",
          "points": 1,
          "present": true
        },
        {
          "value": "no_dyspnea",
          "factor": "respiratory",
          "points": 1,
          "present": true
        },
        {
          "value": 120.0,
          "factor": "systolic_bp_mm_hg",
          "points": 1,
          "present": true
        },
        {
          "value": 70,
          "factor": "pulse",
          "points": 1,
          "present": true
        },
        {
          "value": 15,
          "factor": "gcs",
          "points": 1,
          "present": true
        },
        {
          "value": 14.0,
          "factor": "hemoglobin_g_dl",
          "points": 1,
          "present": true
        },
        {
          "value": 8.0,
          "factor": "wbc_k_ul",
          "points": 1,
          "present": true
        },
        {
          "value": 5.0,
          "factor": "urea_mmol_l",
          "points": 1,
          "present": true
        },
        {
          "value": 140.0,
          "factor": "sodium_mmol_l",
          "points": 1,
          "present": true
        },
        {
          "value": 4.0,
          "factor": "potassium_mmol_l",
          "points": 1,
          "present": true
        },
        {
          "value": "normal",
          "factor": "ecg",
          "points": 1,
          "present": true
        },
        {
          "value": "minor",
          "factor": "operative_severity",
          "points": 1,
          "present": true
        },
        {
          "value": "one",
          "factor": "multiple_procedures",
          "points": 1,
          "present": true
        },
        {
          "value": 50.0,
          "factor": "blood_loss_ml",
          "points": 1,
          "present": true
        },
        {
          "value": "none",
          "factor": "peritoneal_soiling",
          "points": 1,
          "present": true
        },
        {
          "value": "none",
          "factor": "malignancy",
          "points": 1,
          "present": true
        },
        {
          "value": "elective",
          "factor": "mode_of_surgery",
          "points": 1,
          "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": "Copeland GP, Jones D, Walters M",
        "doi": "10.1002/bjs.1800780327",
        "id": "copeland-1991",
        "pmid": "2021856",
        "source": "Br J Surg. 1991;78(3):355-360",
        "title": "POSSUM: a scoring system for surgical audit"
      },
      "formula": "possum",
      "formula_expression": "physiologic_score = sum of 12 Copeland 1991 Table 1 items (1/2/4/8; age has no 8, ECG has no 2); operative_score = sum of 6 Table 2 items (1/2/4/8; multiple_procedures and mode_of_surgery have no 2); ln[R/(1-R)] morbidity = -5.91 + 0.16*physiologic_score + 0.19*operative_score; ln[R/(1-R)] mortality = -7.04 + 0.13*physiologic_score + 0.16*operative_score; estimated_morbidity_percent and estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit",
      "estimated_morbidity_percent": 5.47,
      "estimated_mortality_percent": 1.08,
      "morbidity_logit": -2.85,
      "mortality_logit": -4.52,
      "operative_score": 6,
      "physiologic_score": 12
    }
  ]
}

Response

Field Type Description
formula string possum
formula_expression string Copeland 1991 Tables 1-2 and logits
physiologic_score integer Sum of 12 Table 1 items (min 12; item maxima sum to 92)
operative_score integer Sum of 6 Table 2 items (min 6; item maxima sum to 48)
morbidity_logit number Copeland 1991 morbidity logit, 2 decimal places
mortality_logit number Copeland 1991 mortality logit, 2 decimal places
estimated_morbidity_percent number 100 * exp(logit)/(1+exp(logit)) from the unrounded morbidity logit, 2 decimals. An audit probability, not a diagnosis.
estimated_mortality_percent number 100 * exp(logit)/(1+exp(logit)) from the unrounded mortality logit, 2 decimals. An audit probability, not operative consent.
components array Eighteen Table 1 and Table 2 rows
citation object Copeland 1991 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "value": 50,
      "factor": "age_years",
      "points": 1,
      "present": true
    },
    {
      "value": "no_failure",
      "factor": "cardiac",
      "points": 1,
      "present": true
    },
    {
      "value": "no_dyspnea",
      "factor": "respiratory",
      "points": 1,
      "present": true
    },
    {
      "value": 120.0,
      "factor": "systolic_bp_mm_hg",
      "points": 1,
      "present": true
    },
    {
      "value": 70,
      "factor": "pulse",
      "points": 1,
      "present": true
    },
    {
      "value": 15,
      "factor": "gcs",
      "points": 1,
      "present": true
    },
    {
      "value": 14.0,
      "factor": "hemoglobin_g_dl",
      "points": 1,
      "present": true
    },
    {
      "value": 8.0,
      "factor": "wbc_k_ul",
      "points": 1,
      "present": true
    },
    {
      "value": 5.0,
      "factor": "urea_mmol_l",
      "points": 1,
      "present": true
    },
    {
      "value": 140.0,
      "factor": "sodium_mmol_l",
      "points": 1,
      "present": true
    },
    {
      "value": 4.0,
      "factor": "potassium_mmol_l",
      "points": 1,
      "present": true
    },
    {
      "value": "normal",
      "factor": "ecg",
      "points": 1,
      "present": true
    },
    {
      "value": "minor",
      "factor": "operative_severity",
      "points": 1,
      "present": true
    },
    {
      "value": "one",
      "factor": "multiple_procedures",
      "points": 1,
      "present": true
    },
    {
      "value": 50.0,
      "factor": "blood_loss_ml",
      "points": 1,
      "present": true
    },
    {
      "value": "none",
      "factor": "peritoneal_soiling",
      "points": 1,
      "present": true
    },
    {
      "value": "none",
      "factor": "malignancy",
      "points": 1,
      "present": true
    },
    {
      "value": "elective",
      "factor": "mode_of_surgery",
      "points": 1,
      "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": "Copeland GP, Jones D, Walters M",
    "doi": "10.1002/bjs.1800780327",
    "id": "copeland-1991",
    "pmid": "2021856",
    "source": "Br J Surg. 1991;78(3):355-360",
    "title": "POSSUM: a scoring system for surgical audit"
  },
  "formula": "possum",
  "formula_expression": "physiologic_score = sum of 12 Copeland 1991 Table 1 items (1/2/4/8; age has no 8, ECG has no 2); operative_score = sum of 6 Table 2 items (1/2/4/8; multiple_procedures and mode_of_surgery have no 2); ln[R/(1-R)] morbidity = -5.91 + 0.16*physiologic_score + 0.19*operative_score; ln[R/(1-R)] mortality = -7.04 + 0.13*physiologic_score + 0.16*operative_score; estimated_morbidity_percent and estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit",
  "estimated_morbidity_percent": 5.47,
  "estimated_mortality_percent": 1.08,
  "morbidity_logit": -2.85,
  "mortality_logit": -4.52,
  "operative_score": 6,
  "physiologic_score": 12
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_possum POSSUM needs Copeland 1991 physiologic and operative severity items in published ranges. 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

  • Surgical Apgar — Compute the Gawande 2007 intraoperative Surgical Apgar score from estimated blood loss, lowest mean arterial pressure, and lowest heart rate.
  • APACHE II — Compute the Knaus 1985 APACHE II integer from 12 Acute Physiology Score items, age points, and chronic-health points.

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.