mureo_state_upsert_campaign
Upserts a campaign snapshot into STATE.json to keep it in sync with observed campaign changes, persisting performance metrics and ad delivery status for dashboard reporting and diffing.
Instructions
Atomically upsert a CampaignSnapshot into STATE.json (root campaigns array). Use this to keep STATE.json in sync with campaign metadata changes the agent observes via vendor MCPs or BYOD imports. Pass the optional metrics object to persist the campaign's performance numbers (spend, clicks, conversions, cpa, ctr, …) so the reporting dashboard can render KPIs from STATE.json. Pass the optional ads array to persist ad-level delivery status, so a pause applied outside mureo is recorded and can be diffed on the next run.
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. | |
| campaign | Yes | A CampaignSnapshot for STATE.json plus its platform context. Required: campaign_id, campaign_name, status, platform, account_id. The platform + account_id populate the per-platform ``platforms`` section the dashboard reads (omit them and the client renders as inactive). Optional fields mirror the snapshot schema in docs/strategy-context.md, including ``metrics`` (spend / impressions / clicks / conversions / cpa / ctr / result_indicator / period / fetched_at) for dashboard KPIs. |