mureo_state_platform_not_collected_set
Record why a platform's figures weren't collected, or clear the note after successful sync. Prevents confusing a stopped account with a stopped collector.
Instructions
Record WHY a platform's figures could not be collected — or CLEAR that note once collection succeeds again. Without it, "not collected" and "collected, and the answer was zero" are the same STATE.json, so an operator looking at a card whose numbers have not moved cannot tell a stopped ad account from a stopped collector, and has nothing to act on. Call this when a sync / daily-check fails for one platform (expired token, permissions error, API outage) INSTEAD of writing zeros: the stored figures are left untouched, because they are still the last ones truly collected — this note says they were not UPDATED, never that they are wrong. When what failed IS resolving the account — no accessible ad account, no customer id configured — send account_id as "": that is how mureo spells "unknown", and it is the one platform writer that accepts it. Never invent a placeholder id. attempted_at is stamped by the server — do not compute it. Omit reason (or send null / blank) to CLEAR the note, and do that on the very next successful collection: nothing else retires it, and a note that outlives its failure is permanently stale information stated with confidence. Campaigns, rollups, the conversion override and every other platform are preserved, and last_synced_at is NOT re-stamped (a failed collection is not a sync). Returns the updated state document.
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. | |
| reason | No | What happened, in words an operator can act on — "the Meta access token expired", "the sync did not run". Not a stack trace: it is rendered on the client card, and long text is truncated. Omit / null / blank CLEARS the note. | |
| platform | Yes | Platform key: a built-in (``google_ads`` / ``meta_ads`` / …), a platform an installed plugin registered, or ``plugin:<dist>:<provider>``. Use the SAME key the account is already stored under. | |
| account_id | Yes | The platform account id (Google customer_id / Meta act_*), used to detect a second entry for the same account. Send ``""`` (or null) when THIS is what the collection could not resolve — an account mureo could not name is exactly the failure worth recording, and a made-up id such as "unknown" on two failed platforms reads as ONE ad account held under two keys, which the reporting view then refuses to total. An unknown id is never written over an id the entry already holds: that entry still describes the account it described yesterday. A real id IS written onto the entry, as before. |