MAGENT

WEDGE

Cockcroft–Gault CrCl

Deterministic creatinine clearance from age, sex, total body weight, and creatinine. Not a dosing recommendation.

WEDGE $0.005 USDC GET /api/calc/crcl_cockcroft_gault

When to use

Cockcroft-Gault creatinine clearance from age, sex, total body weight, and creatinine. Use when a label still doses on CrCl rather than CKD-EPI eGFR. Deterministic published formula with citation; not a dosing recommendation.

Try

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

/api/calc/crcl_cockcroft_gault?age=65&sex=female&weight_kg=70&creatinine_mg_dl=1.1

Full URL: https://api.magentlab.com/api/calc/crcl_cockcroft_gault?age=65&sex=female&weight_kg=70&creatinine_mg_dl=1.1

Request

GET /api/calc/crcl_cockcroft_gault · x402 V2 · USDC on Base · $0.005 USDC

x402 V2 curl

Expect HTTP 402 and a PAYMENT-REQUIRED header until you retry with PAYMENT-SIGNATURE.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/crcl_cockcroft_gault?age=65&sex=female&weight_kg=70&creatinine_mg_dl=1.1"

Cursor mcp.json

Intended config for @magent/mcp. This is not npm @x402/fetch (a payment fetch wrapper).

{
  "mcpServers": {
    "magent": {
      "args": [
        "-y",
        "@magent/mcp"
      ],
      "command": "npx",
      "env": {
        "X402_PRIVATE_KEY": "0xYOUR_SPENDING_KEY"
      }
    }
  }
}

Query parameters

Name Type Required Description
age integer required Age in years (18-120).
sex string required · female, male female applies the published 0.85 factor; male does not.
weight_kg number optional Total body weight in kilograms. Provide weight_kg or weight_lb.
weight_lb number optional Total body weight in pounds. Converted as kg = lb * 0.45359237.
creatinine_mg_dl number optional Serum creatinine in mg/dL. Provide this or creatinine_umol_l.
creatinine_umol_l number optional Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.

Success fields

Field Type Description
formula string cockcroft_gault
formula_expression string Exact expression used
age_years integer Age used in the equation
sex string female or male
weight_kg number Total body weight in kg
creatinine_mg_dl number Normalized creatinine
crcl_ml_min number Creatinine clearance in mL/min, 1 decimal place
units string mL/min
weight_basis string Always total_body_weight. Ideal/adjusted body weight is not applied.
citation object Nephron 1976 citation
disclaimer string Not-a-device notice

Example

Frozen fixture. Not a live lookup.

{
  "units": "mL/min",
  "creatinine_mg_dl": 1.1,
  "sex": "female",
  "weight_kg": 70.0,
  "disclaimer": "Not a medical device. Deterministic published-formula or coded-ontology output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
  "citation": {
    "authors": "Cockcroft DW, Gault MH",
    "doi": "10.1159/000180580",
    "id": "cockcroft-1976",
    "source": "Nephron. 1976;16(1):31-41",
    "title": "Prediction of creatinine clearance from serum creatinine"
  },
  "formula": "cockcroft_gault",
  "formula_expression": "CrCl_mL_min = ((140 - age) * weight_kg * (0.85 if female else 1)) / (72 * Scr_mg_dL)",
  "age_years": 65,
  "crcl_ml_min": 56.3,
  "weight_basis": "total_body_weight"
}

Payment

Unpaid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. Retry the same URL with PAYMENT-SIGNATURE. Settlement completes before the tool runs. Full handshake and shared payment errors: Payments.

Errors

HTTP Code When
400 invalid_age age must be an integer from 18 to 120
400 invalid_sex sex must be female or male
400 invalid_weight weight_kg (1-500) or weight_lb (2-1100) is required
400 invalid_creatinine creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required
402 payment_required Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header
409 payment_in_progress The same authorization nonce is already being settled; retry shortly
429 rate_limited Too many requests from this client
503 settlement_uncertain Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE
503 facilitator_unavailable Payment facilitator unavailable
503 facilitator_misconfigured Payment facilitator is not configured
503 facilitator_unauthorized Payment facilitator rejected credentials
503 ledger_unavailable Payment ledger unavailable
503 payment_unavailable Payment processing unavailable

Guarantees

  • Settlement finishes before the tool executes. Uncertain settlement fails closed (HTTP 503).
  • Lookups run on our nodes — no third-party data API wrappers.
  • Localhost, IP literals, and metadata hostnames are rejected.
  • Execution is timeout-bounded and concurrency-capped.