mureo_outcome_evaluate
Evaluate whether a logged advertising action improved, regressed, or is inconclusive by comparing before/after metrics; it returns a reproducible verdict for observation-window reviews.
Instructions
Deterministically evaluate whether a logged action's outcome improved, regressed, or is inconclusive — the reproducible verdict the observation-window review (daily-check) and /learn rely on, instead of eyeballing the numbers. Pass before (typically the action_log entry's metrics_at_action) and after (the current numbers). Pure calculation — works for ANY platform (google_ads / meta_ads / tiktok_ads / plugins) as long as you feed comparable metric names. The verdict is ONE primary metric's: cpa when both sides have conversions, else 'inconclusive' (reason no_primary_metric); every other metric is a reference row. Synonyms merge first (cost_per_conversion is cpa, cost is spend). The primary is judged only when both sides reach the volume floor (conversions 30 for cpa/cpl/roas/conversions, impressions 1000 for ctr/cpm, clicks 200 for cpc/cvr; else insufficient_volume / volume_unknown). A zero baseline is 'inconclusive' (zero_baseline). Count metrics are compared per day using each side's days or period (YESTERDAY / LAST_7_DAYS / LAST_30_DAYS). A change within ±noise_pct (default 10%) is 'inconclusive' (no_change). The floors and the band come from STRATEGY.md ## Guardrails (outcome_noise_pct, outcome_min_conversions, outcome_min_impressions, outcome_min_clicks). To close an observation, pass evaluation_of (the entry's index): the entry's baseline, its decision's expected effects and its campaign's bidding target are read from STATE.json, exactly as the automatic closure reads them; before is refused beside a recorded baseline (evaluation_of_conflicts_with_before), and a result with no metric on both sides is refused (no_comparable_metric). The answer's evaluation is the table to append, unchanged, with evaluation_of via mureo_state_action_log_append.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional path to the file. Defaults to STRATEGY.md / STATE.json in the MCP server's current working directory. Paths outside cwd are refused. | |
| after | Yes | Current metrics, same shape as ``before``. With ``evaluation_of``, pass the campaign's ``metrics`` object from mureo_state_get unchanged, ``period`` and ``fetched_at`` included: ``fetched_at`` is the end of the table's window and ``period`` is what the count rule compares. | |
| before | No | Baseline metrics — metric name → number (e.g. {"cpa": 5000, "conversions": 50, "days": 7}). Usually the action_log entry's metrics_at_action. ``days`` / ``period`` say which window the figures cover; they are read, never scored. Required without ``evaluation_of``; with it, required when the entry recorded no metrics_at_action and refused when it recorded one (evaluation_of_conflicts_with_before). | |
| expected | No | Without evaluation_of only: the effects the change should have (e.g. [{"metric": "cpa", "direction": "down"}]); with several, mark exactly one "primary": true. The verdict is then read off that primary. | |
| noise_pct | No | Noise band in percent, above 0 and at most 100 (0, 100]. Omit it to use the workspace's ``outcome_noise_pct`` guardrail (default 10); pass it only to override that for this one call. A change smaller than this is 'inconclusive' (day-to-day variance). | |
| evaluation_of | No | Positional index (into the full action_log) of the entry being evaluated — the pending entry's ``index``. Its metrics_at_action is the baseline, so ``before`` is refused beside it (evaluation_of_conflicts_with_before) unless the entry recorded none; its decision's expected effects apply, so ``expected`` is refused beside it (evaluation_of_conflicts_with_expected). |