# MGFA Clinical Classification (Jaretzki 2000)

MGFA

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

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

## What it computes

Echo the caller-assigned Jaretzki 2000 Table 1 MGFA Clinical Classification class (I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V) with the published class description. Class V is intubation except routine postoperative management. A feeding tube without intubation is class IVb.

## When to use

When an agent already has a Jaretzki 2000 Table 1 MGFA class as assigned by the caller and needs the published description. magent does not examine the patient, assign class from findings, map to QMG or MG-ADL, or use Osserman.

## When not to use

- Not a medical device. magent does not examine the patient.
- The caller assigns MGFA class I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V. magent does not grade strength, inspect the eyes, or decide intubation or a feeding tube.
- Jaretzki 2000 Table 1 MGFA Clinical Classification only. This is not an outcome measure; the Task Force states the classification should not be used to measure outcome (QMG is separate).
- Not QMG. Not MG-ADL. Not Osserman. Not a treatment, intubation, or feeding-tube order.

## Formula

```
mgfa_class in {I, IIa, IIb, IIIa, IIIb, IVa, IVb, V} as assigned by the caller (Jaretzki 2000 Table 1 MGFA Clinical Classification). Not QMG. Not MG-ADL. Not Osserman. Not an outcome measure.
```

## Citation

[Myasthenia gravis: recommendations for clinical research standards. Task Force of the Medical Scientific Advisory Board of the Myasthenia Gravis Foundation of America](https://doi.org/10.1016/s0003-4975(00)01595-2)
Jaretzki A 3rd, Barohn RJ, Ernstoff RM, Kaminski HJ, Keesey JC, Penn AS, Sanders DB
Ann Thorac Surg. 2000;70(1):327-334
DOI: [10.1016/s0003-4975(00)01595-2](https://doi.org/10.1016/s0003-4975(00)01595-2)

## Worked example

### Class I ocular only

Given: `mgfa_class=I`

1. mgfa_class I as assigned by the caller
2. ocular muscle weakness only; all other muscle strength is normal
3. intubation_class is false


### Class IVb feeding tube without intubation

Given: `mgfa_class=IVb`

1. mgfa_class IVb as assigned by the caller
2. severe oropharyngeal/respiratory predominance; feeding tube without intubation is IVb
3. intubation_class is false


### Class V intubation

Given: `mgfa_class=V`

1. mgfa_class V as assigned by the caller
2. defined by intubation with or without mechanical ventilation, except routine postoperative management
3. intubation_class is true


## Also searched as

- MGFA class
- MGFA Clinical Classification
- Jaretzki 2000
- myasthenia gravis class
- MGFA I IIa IIb
- MGFA class V intubation
- MGFA IVb feeding tube
- Myasthenia Gravis Foundation of America class
- MGFA Task Force classification

## Parameters

- `mgfa_class` (string, required): Jaretzki 2000 Table 1 MGFA Clinical Classification as assigned by the caller: I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V (case-sensitive; reject i, 1, II, IIA). Class I ocular only; II mild, III moderate, IV severe generalized with a = limb/axial and b = oropharyngeal/respiratory; IVb includes feeding tube without intubation; V is intubation except routine postoperative management. magent does not examine the patient.

## 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/mgfa`
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": [
    {
      "mgfa_class": "I"
    },
    {
      "mgfa_class": "I"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mgfa",
  "items": [
    {
      "description": "Any ocular muscle weakness. May have weakness of eye closure. All other muscle strength is normal.",
      "components": [
        {
          "factor": "class_I",
          "met": true
        },
        {
          "factor": "class_IIa",
          "met": false
        },
        {
          "factor": "class_IIb",
          "met": false
        },
        {
          "factor": "class_IIIa",
          "met": false
        },
        {
          "factor": "class_IIIb",
          "met": false
        },
        {
          "factor": "class_IVa",
          "met": false
        },
        {
          "factor": "class_IVb",
          "met": false
        },
        {
          "factor": "class_V",
          "met": 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": "Jaretzki A 3rd, Barohn RJ, Ernstoff RM, Kaminski HJ, Keesey JC, Penn AS, Sanders DB",
        "doi": "10.1016/s0003-4975(00)01595-2",
        "id": "jaretzki-2000",
        "pmid": "10921745",
        "source": "Ann Thorac Surg. 2000;70(1):327-334",
        "title": "Myasthenia gravis: recommendations for clinical research standards. Task Force of the Medical Scientific Advisory Board of the Myasthenia Gravis Foundation of America"
      },
      "formula": "mgfa",
      "formula_expression": "mgfa_class in {I, IIa, IIb, IIIa, IIIb, IVa, IVb, V} as assigned by the caller (Jaretzki 2000 Table 1 MGFA Clinical Classification). Not QMG. Not MG-ADL. Not Osserman. Not an outcome measure.",
      "intubation_class": false,
      "mgfa_class": "I"
    },
    {
      "description": "Any ocular muscle weakness. May have weakness of eye closure. All other muscle strength is normal.",
      "components": [
        {
          "factor": "class_I",
          "met": true
        },
        {
          "factor": "class_IIa",
          "met": false
        },
        {
          "factor": "class_IIb",
          "met": false
        },
        {
          "factor": "class_IIIa",
          "met": false
        },
        {
          "factor": "class_IIIb",
          "met": false
        },
        {
          "factor": "class_IVa",
          "met": false
        },
        {
          "factor": "class_IVb",
          "met": false
        },
        {
          "factor": "class_V",
          "met": 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": "Jaretzki A 3rd, Barohn RJ, Ernstoff RM, Kaminski HJ, Keesey JC, Penn AS, Sanders DB",
        "doi": "10.1016/s0003-4975(00)01595-2",
        "id": "jaretzki-2000",
        "pmid": "10921745",
        "source": "Ann Thorac Surg. 2000;70(1):327-334",
        "title": "Myasthenia gravis: recommendations for clinical research standards. Task Force of the Medical Scientific Advisory Board of the Myasthenia Gravis Foundation of America"
      },
      "formula": "mgfa",
      "formula_expression": "mgfa_class in {I, IIa, IIb, IIIa, IIIb, IVa, IVb, V} as assigned by the caller (Jaretzki 2000 Table 1 MGFA Clinical Classification). Not QMG. Not MG-ADL. Not Osserman. Not an outcome measure.",
      "intubation_class": false,
      "mgfa_class": "I"
    }
  ]
}
```

## Response fields

- `formula` (string): mgfa
- `formula_expression` (string): Published Jaretzki 2000 Table 1 class rule
- `mgfa_class` (string): Caller-assigned class I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V
- `description` (string): Jaretzki 2000 Table 1 wording for that class
- `intubation_class` (boolean): true iff mgfa_class is V
- `components` (array): Per-class Tree rows class_I, class_IIa, class_IIb, class_IIIa, class_IIIb, class_IVa, class_IVb, class_V with factor and met; exactly one is met
- `citation` (object): Jaretzki 2000 Ann Thorac Surg citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "description": "Any ocular muscle weakness. May have weakness of eye closure. All other muscle strength is normal.",
  "components": [
    {
      "factor": "class_I",
      "met": true
    },
    {
      "factor": "class_IIa",
      "met": false
    },
    {
      "factor": "class_IIb",
      "met": false
    },
    {
      "factor": "class_IIIa",
      "met": false
    },
    {
      "factor": "class_IIIb",
      "met": false
    },
    {
      "factor": "class_IVa",
      "met": false
    },
    {
      "factor": "class_IVb",
      "met": false
    },
    {
      "factor": "class_V",
      "met": 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": "Jaretzki A 3rd, Barohn RJ, Ernstoff RM, Kaminski HJ, Keesey JC, Penn AS, Sanders DB",
    "doi": "10.1016/s0003-4975(00)01595-2",
    "id": "jaretzki-2000",
    "pmid": "10921745",
    "source": "Ann Thorac Surg. 2000;70(1):327-334",
    "title": "Myasthenia gravis: recommendations for clinical research standards. Task Force of the Medical Scientific Advisory Board of the Myasthenia Gravis Foundation of America"
  },
  "formula": "mgfa",
  "formula_expression": "mgfa_class in {I, IIa, IIb, IIIa, IIIb, IVa, IVb, V} as assigned by the caller (Jaretzki 2000 Table 1 MGFA Clinical Classification). Not QMG. Not MG-ADL. Not Osserman. Not an outcome measure.",
  "intubation_class": false,
  "mgfa_class": "I"
}
```

## Errors

- HTTP 400 `invalid_mgfa`: mgfa_class must be I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V (Jaretzki 2000 MGFA Clinical Classification). 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

- [MG-ADL](https://magentlab.com/docs/mg-adl) — Sum eight caller-assigned Wolfe 1999 MG-ADL items (each integer 0-3) and return the published 0-24 total. Does not map to QMG or assign MGFA class.

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