MAGENT

Neurology · LIVE

IVT Class III Harm contraindications

IVT contraindications

Apply Powers 2018 Table 6 Class III: Harm caller flags and return whether intravenous alteplase (IVT) is contraindicated. contraindicated is true iff any of the 15 published Harm flags is true.

LIVE $0.005 USDC GET /api/calc/ivt_contraindications

Markdown: /docs/ivt-contraindications.md · Canonical: https://magentlab.com/docs/ivt-contraindications

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

What it computes

Apply Powers 2018 Table 6 Class III: Harm caller flags and return whether intravenous alteplase (IVT) is contraindicated. contraindicated is true iff any of the 15 published Harm flags is true.

When to use

When an agent already has caller-assigned Powers 2018 Table 6 Class III Harm flags and needs the published any-flag combination. magent does not read CT, assay coagulation, or examine the patient. Not Class I eligibility, not a time window, and not a dose.

When not to use

  • Not a medical device and not a treatment order.
  • Encodes Powers 2018 Table 6 Class III: Harm rows only. Does not encode Class III No Benefit rows (unclear/wake-up onset windows, extensive CT hypoattenuation), Class I eligibility, 0-3h vs 3-4.5h windows, or a dose.
  • magent does not read CT, assay coagulation, or examine the patient. Each flag is caller-assigned.
  • Not eligibility for tenecteplase. Intravenous alteplase (IVT) Harm flags only.
  • Coagulopathy is one caller-assigned flag (platelets <100000/mm3 or INR >1.7 or aPTT >40 s or PT >15 s as in Table 6). magent does not assay labs.
  • DOAC not cleared is caller-assigned from that Table 6 row (direct thrombin or factor Xa inhibitor AND labs not documented normal AND last dose not >48 h with normal renal function).

Formula

contraindicated iff ct_ich or ischemic_stroke_within_3_mo or severe_head_trauma_within_3_mo or posttraumatic_infarction_in_hospital or intracranial_spinal_surgery_within_3_mo or history_ich or sah_presentation or gi_malignancy_or_gi_bleed_21d or coagulopathy or lmwh_treatment_dose_within_24h or doac_not_cleared or gp2b3a_concurrent or infective_endocarditis or aortic_arch_dissection or intra_axial_neoplasm (Powers 2018 Table 6 Class III: Harm). Not Class III No Benefit (unclear/wake-up onset windows, extensive CT hypoattenuation). Not Class I eligibility. Not 0-3h vs 3-4.5h. Not a dose. magent does not read CT, assay coagulation, or examine the patient. Not a treatment order

Citation

Title
2018 Guidelines for the Early Management of Patients With Acute Ischemic Stroke: A Guideline for Healthcare Professionals From the American Heart Association/American Stroke Association
Authors
Powers WJ, Rabinstein AA, Ackerson T, et al.
Source
Stroke. 2018;49(3):e46-e110
DOI
10.1161/STR.0000000000000158

Worked example

All 15 Class III Harm flags false is not contraindicated

Given: aortic_arch_dissection=falsecoagulopathy=falsect_ich=falsedoac_not_cleared=falsegi_malignancy_or_gi_bleed_21d=falsegp2b3a_concurrent=falsehistory_ich=falseinfective_endocarditis=falseintra_axial_neoplasm=falseintracranial_spinal_surgery_within_3_mo=falseischemic_stroke_within_3_mo=falselmwh_treatment_dose_within_24h=falseposttraumatic_infarction_in_hospital=falsesah_presentation=falsesevere_head_trauma_within_3_mo=false

  1. each Powers 2018 Table 6 Class III: Harm flag is false
  2. no Harm row is met
  3. contraindicated false

CT acute intracranial hemorrhage is contraindicated

Given: aortic_arch_dissection=falsecoagulopathy=falsect_ich=truedoac_not_cleared=falsegi_malignancy_or_gi_bleed_21d=falsegp2b3a_concurrent=falsehistory_ich=falseinfective_endocarditis=falseintra_axial_neoplasm=falseintracranial_spinal_surgery_within_3_mo=falseischemic_stroke_within_3_mo=falselmwh_treatment_dose_within_24h=falseposttraumatic_infarction_in_hospital=falsesah_presentation=falsesevere_head_trauma_within_3_mo=false

  1. ct_ich true
  2. the other 14 Class III Harm flags are false
  3. any Harm flag is enough
  4. contraindicated true

Also searched as

  • IVT contraindications
  • intravenous alteplase contraindications
  • Powers 2018 Table 6
  • Class III Harm IVT
  • IV alteplase exclusion criteria
  • acute ischemic stroke IVT Harm rows
  • Powers 2018 IVT contraindications

Try

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

/api/calc/ivt_contraindications?ct_ich=false&ischemic_stroke_within_3_mo=false&severe_head_trauma_within_3_mo=false&posttraumatic_infarction_in_hospital=false&intracranial_spinal_surgery_within_3_mo=false&history_ich=false&sah_presentation=false&gi_malignancy_or_gi_bleed_21d=false&coagulopathy=false&lmwh_treatment_dose_within_24h=false&doac_not_cleared=false&gp2b3a_concurrent=false&infective_endocarditis=false&aortic_arch_dissection=false&intra_axial_neoplasm=false

Full URL: https://api.magentlab.com/api/calc/ivt_contraindications?ct_ich=false&ischemic_stroke_within_3_mo=false&severe_head_trauma_within_3_mo=false&posttraumatic_infarction_in_hospital=false&intracranial_spinal_surgery_within_3_mo=false&history_ich=false&sah_presentation=false&gi_malignancy_or_gi_bleed_21d=false&coagulopathy=false&lmwh_treatment_dose_within_24h=false&doac_not_cleared=false&gp2b3a_concurrent=false&infective_endocarditis=false&aortic_arch_dissection=false&intra_axial_neoplasm=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/ivt_contraindications?ct_ich=false&ischemic_stroke_within_3_mo=false&severe_head_trauma_within_3_mo=false&posttraumatic_infarction_in_hospital=false&intracranial_spinal_surgery_within_3_mo=false&history_ich=false&sah_presentation=false&gi_malignancy_or_gi_bleed_21d=false&coagulopathy=false&lmwh_treatment_dose_within_24h=false&doac_not_cleared=false&gp2b3a_concurrent=false&infective_endocarditis=false&aortic_arch_dissection=false&intra_axial_neoplasm=false"

Parameters

Name Type Required Description
ct_ich boolean required CT reveals acute intracranial hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read CT.
ischemic_stroke_within_3_mo boolean required Prior ischemic stroke within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not date prior strokes.
severe_head_trauma_within_3_mo boolean required Recent severe head trauma within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.
posttraumatic_infarction_in_hospital boolean required Posttraumatic infarction in the acute in-hospital phase as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.
intracranial_spinal_surgery_within_3_mo boolean required Intracranial or spinal surgery within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read an operative note.
history_ich boolean required History of intracranial hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read prior imaging.
sah_presentation boolean required Presentation most consistent with subarachnoid hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.
gi_malignancy_or_gi_bleed_21d boolean required Structural GI malignancy or GI bleed within 21 days as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.
coagulopathy boolean required Caller-assigned coagulopathy as in Table 6 (platelets <100000/mm3 or INR >1.7 or aPTT >40 s or PT >15 s). One flag. true or false. magent does not assay labs.
lmwh_treatment_dose_within_24h boolean required Treatment-dose LMWH within the previous 24 h as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read a medication list.
doac_not_cleared boolean required Taking a direct thrombin or factor Xa inhibitor AND labs not documented normal AND last dose not >48 h with normal renal function, as assigned by the caller from that Table 6 row. true or false. magent does not assay labs.
gp2b3a_concurrent boolean required Concurrent GP IIb/IIIa inhibitor as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read a medication list.
infective_endocarditis boolean required Symptoms consistent with infective endocarditis as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.
aortic_arch_dissection boolean required Known or suspected aortic arch dissection as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.
intra_axial_neoplasm boolean required Intra-axial intracranial neoplasm as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read imaging.

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/ivt_contraindications 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": [
    {
      "aortic_arch_dissection": "false",
      "coagulopathy": "false",
      "ct_ich": "false",
      "doac_not_cleared": "false",
      "gi_malignancy_or_gi_bleed_21d": "false",
      "gp2b3a_concurrent": "false",
      "history_ich": "false",
      "infective_endocarditis": "false",
      "intra_axial_neoplasm": "false",
      "intracranial_spinal_surgery_within_3_mo": "false",
      "ischemic_stroke_within_3_mo": "false",
      "lmwh_treatment_dose_within_24h": "false",
      "posttraumatic_infarction_in_hospital": "false",
      "sah_presentation": "false",
      "severe_head_trauma_within_3_mo": "false"
    },
    {
      "aortic_arch_dissection": "false",
      "coagulopathy": "false",
      "ct_ich": "false",
      "doac_not_cleared": "false",
      "gi_malignancy_or_gi_bleed_21d": "false",
      "gp2b3a_concurrent": "false",
      "history_ich": "false",
      "infective_endocarditis": "false",
      "intra_axial_neoplasm": "false",
      "intracranial_spinal_surgery_within_3_mo": "false",
      "ischemic_stroke_within_3_mo": "false",
      "lmwh_treatment_dose_within_24h": "false",
      "posttraumatic_infarction_in_hospital": "false",
      "sah_presentation": "false",
      "severe_head_trauma_within_3_mo": "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/ivt_contraindications",
  "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": "Powers WJ, Rabinstein AA, Ackerson T, et al.",
        "doi": "10.1161/STR.0000000000000158",
        "id": "powers-2018",
        "pmid": "29133354",
        "source": "Stroke. 2018;49(3):e46-e110",
        "title": "2018 Guidelines for the Early Management of Patients With Acute Ischemic Stroke: A Guideline for Healthcare Professionals From the American Heart Association/American Stroke Association"
      },
      "formula": "ivt_contraindications",
      "formula_expression": "contraindicated iff ct_ich or ischemic_stroke_within_3_mo or severe_head_trauma_within_3_mo or posttraumatic_infarction_in_hospital or intracranial_spinal_surgery_within_3_mo or history_ich or sah_presentation or gi_malignancy_or_gi_bleed_21d or coagulopathy or lmwh_treatment_dose_within_24h or doac_not_cleared or gp2b3a_concurrent or infective_endocarditis or aortic_arch_dissection or intra_axial_neoplasm (Powers 2018 Table 6 Class III: Harm). Not Class III No Benefit (unclear/wake-up onset windows, extensive CT hypoattenuation). Not Class I eligibility. Not 0-3h vs 3-4.5h. Not a dose. magent does not read CT, assay coagulation, or examine the patient. Not a treatment order",
      "criteria": [
        {
          "factor": "ct_ich",
          "met": false
        },
        {
          "factor": "ischemic_stroke_within_3_mo",
          "met": false
        },
        {
          "factor": "severe_head_trauma_within_3_mo",
          "met": false
        },
        {
          "factor": "posttraumatic_infarction_in_hospital",
          "met": false
        },
        {
          "factor": "intracranial_spinal_surgery_within_3_mo",
          "met": false
        },
        {
          "factor": "history_ich",
          "met": false
        },
        {
          "factor": "sah_presentation",
          "met": false
        },
        {
          "factor": "gi_malignancy_or_gi_bleed_21d",
          "met": false
        },
        {
          "factor": "coagulopathy",
          "met": false
        },
        {
          "factor": "lmwh_treatment_dose_within_24h",
          "met": false
        },
        {
          "factor": "doac_not_cleared",
          "met": false
        },
        {
          "factor": "gp2b3a_concurrent",
          "met": false
        },
        {
          "factor": "infective_endocarditis",
          "met": false
        },
        {
          "factor": "aortic_arch_dissection",
          "met": false
        },
        {
          "factor": "intra_axial_neoplasm",
          "met": false
        },
        {
          "factor": "contraindicated",
          "met": false
        }
      ],
      "aortic_arch_dissection": false,
      "coagulopathy": false,
      "contraindicated": false,
      "ct_ich": false,
      "doac_not_cleared": false,
      "gi_malignancy_or_gi_bleed_21d": false,
      "gp2b3a_concurrent": false,
      "history_ich": false,
      "infective_endocarditis": false,
      "intra_axial_neoplasm": false,
      "intracranial_spinal_surgery_within_3_mo": false,
      "ischemic_stroke_within_3_mo": false,
      "lmwh_treatment_dose_within_24h": false,
      "posttraumatic_infarction_in_hospital": false,
      "sah_presentation": false,
      "severe_head_trauma_within_3_mo": 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": "Powers WJ, Rabinstein AA, Ackerson T, et al.",
        "doi": "10.1161/STR.0000000000000158",
        "id": "powers-2018",
        "pmid": "29133354",
        "source": "Stroke. 2018;49(3):e46-e110",
        "title": "2018 Guidelines for the Early Management of Patients With Acute Ischemic Stroke: A Guideline for Healthcare Professionals From the American Heart Association/American Stroke Association"
      },
      "formula": "ivt_contraindications",
      "formula_expression": "contraindicated iff ct_ich or ischemic_stroke_within_3_mo or severe_head_trauma_within_3_mo or posttraumatic_infarction_in_hospital or intracranial_spinal_surgery_within_3_mo or history_ich or sah_presentation or gi_malignancy_or_gi_bleed_21d or coagulopathy or lmwh_treatment_dose_within_24h or doac_not_cleared or gp2b3a_concurrent or infective_endocarditis or aortic_arch_dissection or intra_axial_neoplasm (Powers 2018 Table 6 Class III: Harm). Not Class III No Benefit (unclear/wake-up onset windows, extensive CT hypoattenuation). Not Class I eligibility. Not 0-3h vs 3-4.5h. Not a dose. magent does not read CT, assay coagulation, or examine the patient. Not a treatment order",
      "criteria": [
        {
          "factor": "ct_ich",
          "met": false
        },
        {
          "factor": "ischemic_stroke_within_3_mo",
          "met": false
        },
        {
          "factor": "severe_head_trauma_within_3_mo",
          "met": false
        },
        {
          "factor": "posttraumatic_infarction_in_hospital",
          "met": false
        },
        {
          "factor": "intracranial_spinal_surgery_within_3_mo",
          "met": false
        },
        {
          "factor": "history_ich",
          "met": false
        },
        {
          "factor": "sah_presentation",
          "met": false
        },
        {
          "factor": "gi_malignancy_or_gi_bleed_21d",
          "met": false
        },
        {
          "factor": "coagulopathy",
          "met": false
        },
        {
          "factor": "lmwh_treatment_dose_within_24h",
          "met": false
        },
        {
          "factor": "doac_not_cleared",
          "met": false
        },
        {
          "factor": "gp2b3a_concurrent",
          "met": false
        },
        {
          "factor": "infective_endocarditis",
          "met": false
        },
        {
          "factor": "aortic_arch_dissection",
          "met": false
        },
        {
          "factor": "intra_axial_neoplasm",
          "met": false
        },
        {
          "factor": "contraindicated",
          "met": false
        }
      ],
      "aortic_arch_dissection": false,
      "coagulopathy": false,
      "contraindicated": false,
      "ct_ich": false,
      "doac_not_cleared": false,
      "gi_malignancy_or_gi_bleed_21d": false,
      "gp2b3a_concurrent": false,
      "history_ich": false,
      "infective_endocarditis": false,
      "intra_axial_neoplasm": false,
      "intracranial_spinal_surgery_within_3_mo": false,
      "ischemic_stroke_within_3_mo": false,
      "lmwh_treatment_dose_within_24h": false,
      "posttraumatic_infarction_in_hospital": false,
      "sah_presentation": false,
      "severe_head_trauma_within_3_mo": false
    }
  ]
}

Response

Field Type Description
formula string ivt_contraindications
formula_expression string Powers 2018 Table 6 Class III: Harm any-flag combination
ct_ich boolean Caller-assigned ct_ich flag used
ischemic_stroke_within_3_mo boolean Caller-assigned ischemic_stroke_within_3_mo flag used
severe_head_trauma_within_3_mo boolean Caller-assigned severe_head_trauma_within_3_mo flag used
posttraumatic_infarction_in_hospital boolean Caller-assigned posttraumatic_infarction_in_hospital flag used
intracranial_spinal_surgery_within_3_mo boolean Caller-assigned intracranial_spinal_surgery_within_3_mo flag used
history_ich boolean Caller-assigned history_ich flag used
sah_presentation boolean Caller-assigned sah_presentation flag used
gi_malignancy_or_gi_bleed_21d boolean Caller-assigned gi_malignancy_or_gi_bleed_21d flag used
coagulopathy boolean Caller-assigned coagulopathy flag used
lmwh_treatment_dose_within_24h boolean Caller-assigned lmwh_treatment_dose_within_24h flag used
doac_not_cleared boolean Caller-assigned doac_not_cleared flag used
gp2b3a_concurrent boolean Caller-assigned gp2b3a_concurrent flag used
infective_endocarditis boolean Caller-assigned infective_endocarditis flag used
aortic_arch_dissection boolean Caller-assigned aortic_arch_dissection flag used
intra_axial_neoplasm boolean Caller-assigned intra_axial_neoplasm flag used
contraindicated boolean true iff any Powers 2018 Table 6 Class III: Harm caller flag is true. Not a treatment order. Not Class I eligibility. Not a dose.
criteria array Rows for each caller flag and contraindicated with factor and met
citation object Powers 2018 Stroke AHA/ASA acute ischemic stroke guideline 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": "Powers WJ, Rabinstein AA, Ackerson T, et al.",
    "doi": "10.1161/STR.0000000000000158",
    "id": "powers-2018",
    "pmid": "29133354",
    "source": "Stroke. 2018;49(3):e46-e110",
    "title": "2018 Guidelines for the Early Management of Patients With Acute Ischemic Stroke: A Guideline for Healthcare Professionals From the American Heart Association/American Stroke Association"
  },
  "formula": "ivt_contraindications",
  "formula_expression": "contraindicated iff ct_ich or ischemic_stroke_within_3_mo or severe_head_trauma_within_3_mo or posttraumatic_infarction_in_hospital or intracranial_spinal_surgery_within_3_mo or history_ich or sah_presentation or gi_malignancy_or_gi_bleed_21d or coagulopathy or lmwh_treatment_dose_within_24h or doac_not_cleared or gp2b3a_concurrent or infective_endocarditis or aortic_arch_dissection or intra_axial_neoplasm (Powers 2018 Table 6 Class III: Harm). Not Class III No Benefit (unclear/wake-up onset windows, extensive CT hypoattenuation). Not Class I eligibility. Not 0-3h vs 3-4.5h. Not a dose. magent does not read CT, assay coagulation, or examine the patient. Not a treatment order",
  "criteria": [
    {
      "factor": "ct_ich",
      "met": false
    },
    {
      "factor": "ischemic_stroke_within_3_mo",
      "met": false
    },
    {
      "factor": "severe_head_trauma_within_3_mo",
      "met": false
    },
    {
      "factor": "posttraumatic_infarction_in_hospital",
      "met": false
    },
    {
      "factor": "intracranial_spinal_surgery_within_3_mo",
      "met": false
    },
    {
      "factor": "history_ich",
      "met": false
    },
    {
      "factor": "sah_presentation",
      "met": false
    },
    {
      "factor": "gi_malignancy_or_gi_bleed_21d",
      "met": false
    },
    {
      "factor": "coagulopathy",
      "met": false
    },
    {
      "factor": "lmwh_treatment_dose_within_24h",
      "met": false
    },
    {
      "factor": "doac_not_cleared",
      "met": false
    },
    {
      "factor": "gp2b3a_concurrent",
      "met": false
    },
    {
      "factor": "infective_endocarditis",
      "met": false
    },
    {
      "factor": "aortic_arch_dissection",
      "met": false
    },
    {
      "factor": "intra_axial_neoplasm",
      "met": false
    },
    {
      "factor": "contraindicated",
      "met": false
    }
  ],
  "aortic_arch_dissection": false,
  "coagulopathy": false,
  "contraindicated": false,
  "ct_ich": false,
  "doac_not_cleared": false,
  "gi_malignancy_or_gi_bleed_21d": false,
  "gp2b3a_concurrent": false,
  "history_ich": false,
  "infective_endocarditis": false,
  "intra_axial_neoplasm": false,
  "intracranial_spinal_surgery_within_3_mo": false,
  "ischemic_stroke_within_3_mo": false,
  "lmwh_treatment_dose_within_24h": false,
  "posttraumatic_infarction_in_hospital": false,
  "sah_presentation": false,
  "severe_head_trauma_within_3_mo": false
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_ivt IVT contraindication flags must each be true or false as published in Powers 2018 Table 6 Class III Harm rows. 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

  • Alteplase stroke dose — Compute NINDS 1995 intravenous alteplase milligrams from weight: 0.9 mg/kg capped at 90 mg, with 10% as a bolus and the remainder over 60 minutes.
  • NIHSS — Sum Brott 1989 NIH stroke scale points from 15 caller-assigned examination integers, including pupillary response and plantar reflex. Weaker-limb motor arm and leg. Does not apply later total-score severity 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.