Compute derived metrics
compute_metricsComputes derived quantities on an uploaded recording: cheaper than a full analysis when a number is all that is needed. Each call counts one unit of the key's monthly allowance, a repeated call included.
Each result is {"status": "ok", "value": ...} or {"status": "unavailable", "error": ..., "message": ...}. A metric whose requirements
are unmet is refused with the reason, never computed on inadequate input
and never returned as a bare null.
substrate_summary: the headline FATMAX numbers for about a sixth of the full substrate analysis.fatmax_foundfalse means fat oxidation was still climbing at one end of the range, so FATMAX lies outside what the protocol covered (a fact about the protocol, not a missing value).steady_statefalse means the test was a ramp: FATMAX reads high and is not comparable with a graded test.windows_above_rer_onecounts the windows where the fat number is an upper bound, because above RER 1.0 exhaled CO2 carries a non-metabolic part.ve_vco2_slope: a profile over the first 25/50/75/100 % of exercise, not one number, because a slope that climbs across a test is a different finding from a flat one.phases: rest, warm-up, exercise and recovery, inferred from the signals with an error of tens of seconds, so no boundary is exact. An absent rest phase is an answer, not a failure.gas_qualityandsampling_adequacy: whether the recording can support a measurement at all.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cpet_id": "<cpet_id>",
"metrics": "<metrics>"
},
"name": "compute_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cpet_id | Yes | Handle from upload_cpet, create_upload or get_sample_cpet. | |
| metrics | Yes | Names from list_metrics, e.g. ["vo2max", "ve_vco2_slope", "gas_quality", "phases"]. |