MAGENT

LIVE

Mosteller BSA

Deterministic Mosteller BSA for oncology dosing arithmetic. Cited formula. Not a dosing recommendation.

LIVE $0.005 USDC GET /api/calc/bsa_mosteller

When to use

Mosteller body surface area from height and weight. Use for oncology dosing arithmetic. 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/bsa_mosteller?height_cm=170&weight_kg=70

Full URL: https://api.magentlab.com/api/calc/bsa_mosteller?height_cm=170&weight_kg=70

Request

GET /api/calc/bsa_mosteller · 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/bsa_mosteller?height_cm=170&weight_kg=70"

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
height_cm number optional Height in centimeters. Provide height_cm or height_in.
weight_kg number optional Weight in kilograms. Provide weight_kg or weight_lb.
height_in number optional Height in inches. Converted as cm = in * 2.54.
weight_lb number optional Weight in pounds. Converted as kg = lb * 0.45359237.

Success fields

Field Type Description
formula string mosteller
formula_expression string Exact expression used
height_cm number Normalized height in cm
weight_kg number Normalized weight in kg
bsa_m2 number Body surface area in m^2, 4 decimal places
citation object Peer-reviewed formula citation
disclaimer string Not-a-device notice

Example

Frozen fixture. Not a live lookup.

{
  "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.",
  "bsa_m2": 1.8181,
  "citation": {
    "authors": "Mosteller RD",
    "doi": "10.1056/NEJM198710223171717",
    "id": "mosteller-1987",
    "source": "N Engl J Med. 1987;317(17):1098",
    "title": "Simplified calculation of body-surface area"
  },
  "formula": "mosteller",
  "formula_expression": "BSA_m2 = sqrt((height_cm * weight_kg) / 3600)",
  "height_cm": 170.0,
  "weight_kg": 70.0
}

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_height height_cm (50-250) or height_in (20-98) is required
400 invalid_weight weight_kg (1-500) or weight_lb (2-1100) 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.