# Hardin 2019 SCARF Score Calculator

> Hardin 2019 SCARF Score Calculator 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-15).

Computes the 4-point SCARF score (Hardin 2019) for post-surgical respiratory complication risk from four caller-assigned boolean flags

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/scarf
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hardin-2019-scarf-score-calculator-2fad9c99
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_T3r0UdMhtK1Orp85oglm9

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 hardin-2019-scarf-score-calculator-2fad9c99
```

Example prompt: My postop patient has incentive spirometry below 50% predicted, a respiratory rate over 20, a pain score of 7, and can't clear secretions adequately — can you calculate their SCARF score using the Hardin 2019 criteria?

## When to prefer this

Use this endpoint when you have already assessed a postoperative or surgical patient for the four SCARF criteria (spirometry volume, respiratory rate, pain score, cough adequacy) and need to aggregate them into a validated integer risk score. Prefer this over manual summation when building clinical decision-support workflows, automated documentation pipelines, or risk-stratification triggers for respiratory monitoring. This endpoint does not replace clinical assessment — it only performs the arithmetic aggregation and threshold comparison defined by Hardin 2019.

## Known failure modes

- Missing required boolean flags returns a validation error
- Non-boolean input for any flag causes a schema error
- All four flags must be explicitly provided; defaults are not assumed
- Score is caller-dependent — incorrect clinical assessment upstream leads to inaccurate results

## How this service works

Hardin 2019 SCARF from four caller-assigned flags (incentive spirometry <50% predicted, respiratory rate >20, numeric pain score ≥5, inadequate cough). 1 point each, total 0-4. Proposed threshold is score greater than 2. magent does not measure spirometry or examine the chest. Not a named risk class, analgesia order, or SSRF order.

## Output

Returns the integer SCARF score (0–4) summing the four boolean flags, each worth 1 point. A score greater than 2 meets the Hardin 2019 proposed high-risk threshold for surgical respiratory failure. Does not include spirometry measurements, pain assessment, chest examination, or clinical 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": [
      "incentive_spirometry_lt_50_predicted",
      "respiratory_rate_gt_20",
      "pain_score_ge_5",
      "inadequate_cough"
     ],
     "properties": {
      "pain_score_ge_5": {
       "type": "boolean",
       "description": "Numeric pain score ≥5 as assigned by the caller (Hardin 2019). true or false. magent does not score pain."
      },
      "inadequate_cough": {
       "type": "boolean",
       "description": "Inadequate cough (unable to clear secretions) as assigned by the caller (Hardin 2019). true or false. magent does not examine the chest or cough."
      },
      "respiratory_rate_gt_20": {
       "type": "boolean",
       "description": "Respiratory rate >20 breaths/min as assigned by the caller (Hardin 2019). true or false. magent does not count respiratory rate."
      },
      "incentive_spirometry_lt_50_predicted": {
       "type": "boolean",
       "description": "Incentive spirometry volume <50% of predicted as assigned by the caller (Hardin 2019). true or false. magent does not measure incentive spirometry."
      }
     }
    }
   },
   "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/hardin-2019-scarf-score-calculator-2fad9c99/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)
