# POSSUM surgical audit

POSSUM

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

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

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

## Worked example

### All lowest Table 1 and Table 2 poles

Given: `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`

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=80, blood_loss_ml=1500, cardiac=raised_jvp_or_cardiomegaly, ecg=other_abnormal_or_ectopics_or_q_st_t, gcs=5, hemoglobin_g_dl=8, malignancy=distant_metastases, mode_of_surgery=immediate_lt_2h, multiple_procedures=more_than_two, operative_severity=major_plus, peritoneal_soiling=free_bowel_pus_blood, potassium_mmol_l=2.5, pulse=30, respiratory=rest_or_fibrosis_consolidation, sodium_mmol_l=120, systolic_bp_mm_hg=80, urea_mmol_l=20, wbc_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

## Parameters

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

Method: `POST /api/calc/possum`
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_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"
    }
  ]
}
```

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

Example 200:

```json
{
  "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 fields

- `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

Frozen fixture. Not a live lookup.

```json
{
  "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
}
```

## Errors

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

- [Surgical Apgar](https://magentlab.com/docs/surgical-apgar) — Compute the Gawande 2007 intraoperative Surgical Apgar score from estimated blood loss, lowest mean arterial pressure, and lowest heart rate.
- [APACHE II](https://magentlab.com/docs/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.

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