calculationType field selects the variant: LLM_JUDGE (LLM-evaluated), FORMULA (computed from a math expression over other metrics), or PATTERN (detects a trigger→outcome pattern within a window). To create a threshold on top of an existing metric, use POST /metric/definitions/{idOrSlug}/thresholds instead.
Calls
POST /v1/metric/definitionsRequest body
This endpoint accepts one of several request shapes, so the body is supplied as JSON through--data or on standard input rather than as individual flags.
object
Requires
calculationType, name, outputTypeobject
Requires
calculationType, name, outputType, formula, sourcesobject
Requires
calculationType, name, operation, outcome