# magent GMAWS Calculator (McPherson 2012)

> magent GMAWS Calculator (McPherson 2012) is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Computes the Glasgow Modified Alcohol Withdrawal Scale (GMAWS) score from five caller-supplied 0–2 item ratings and returns the corresponding severity band from McPherson 2012 Figure 1.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/gmaws
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-gmaws-calculator-mcpherson-2012-92a3e500
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SphqCeBmywesb6UwO03i7

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability magent-gmaws-calculator-mcpherson-2012-92a3e500
```

Example prompt: Score this patient's alcohol withdrawal using the GMAWS: tremor is 1 (on movement), sweating is 2 (drenching), hallucination is 1 (dissuadable), orientation is 0 (orientated), and agitation is 1 (anxious). What band does that put them in?

## When to prefer this

Use this endpoint when you need a fast, reproducible GMAWS score strictly following McPherson 2012 Figure 1 descriptors and band boundaries, particularly when integrating clinical scoring into an automated workflow. Prefer this over manual calculation to avoid arithmetic errors or band misclassification. Not suitable when the scoring instrument should be CIWA-Ar or another scale.

## Known failure modes

- Any item score outside 0–2 (e.g. integer 3 or negative) will likely cause a validation error or unexpected result
- Missing any of the five required query parameters returns an error
- Non-integer values (e.g. floats or strings) for item scores cause schema validation failure
- Temperature is not a GMAWS item and passing it will be ignored or rejected

## How this service works

McPherson 2012 GMAWS from five caller-assigned 0-2 items (tremor, sweating, hallucination, orientation, agitation) using that paper's Figure 1 0/1/2 descriptors. magent sums only (max 10) and returns Figure 1 bands zero, 1_to_3, 4_to_8, or 9_to_10. Temperature is not an item. magent does not observe the patient. Not a benzodiazepine or treatment order.

## Output

Returns the GMAWS total score (integer 0–10, sum of the five items) and the McPherson 2012 Figure 1 severity band: 'zero', '1_to_3', '4_to_8', or '9_to_10'. Does not include treatment recommendations or medication orders.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "tremor",
      "sweating",
      "hallucination",
      "orientation",
      "agitation"
     ],
     "properties": {
      "tremor": {
       "type": "integer",
       "description": "Caller-assigned McPherson 2012 Figure 1 tremor (integer 0-2): 0 no tremor; 1 on movement; 2 at rest. magent does not observe the patient."
      },
      "sweating": {
       "type": "integer",
       "description": "Caller-assigned McPherson 2012 Figure 1 sweating (integer 0-2): 0 no sweat visible; 1 moist; 2 drenching sweats. magent does not observe the patient."
      },
      "agitation": {
       "type": "integer",
       "description": "Caller-assigned McPherson 2012 Figure 1 agitation (integer 0-2): 0 calm; 1 anxious; 2 panicky. magent does not observe the patient."
      },
      "orientation": {
       "type": "integer",
       "description": "Caller-assigned McPherson 2012 Figure 1 orientation (integer 0-2): 0 orientated; 1 vague/detached; 2 disorientated, no contact. magent does not observe the patient."
      },
      "hallucination": {
       "type": "integer",
       "description": "Caller-assigned McPherson 2012 Figure 1 hallucination (integer 0-2): 0 not present; 1 dissuadable; 2 not dissuadable. magent does not observe the patient."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-gmaws-calculator-mcpherson-2012-92a3e500/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
