mureo_history_query
Query archived action logs, journals, daily metrics, and report versions to trace past changes, failures, and spend beyond current state retention.
Instructions
Read the PAST — the one tool for any question that reaches beyond what STATE.json currently holds: what was changed on a campaign in July, every version a report has had, what a session tried and was refused, daily spend from before the 35-day retention window. Four sources, one set of filters: action_log (the curated record of changes, each entry with its index in the full log — the index related_actions and evaluation_of name), journal (EVERY tool call and its outcome, including the denied and the failed, which action_log correctly never holds), daily (the day-grain series, the archived days and the ones still in the document merged into one), and reports (every version ever written of one report kind). limit applies PER source and each section says whether more matched than came back. Use mureo_state_get for the CURRENT state of the document; use this for what it no longer holds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Which report kind's history to read. Required when `sources` includes 'reports', and refused without it. | |
| path | No | Optional path to STATE.json. Defaults to STATE.json in the MCP server's current working directory. Paths outside it are refused. | |
| tool | No | Only calls of this tool, by exact name. Journal only — the other sources record no such field, and a filter they cannot answer is ignored by them rather than applied. | |
| limit | No | Entries PER SOURCE, newest kept (default 50, max 200). A source that had more says `truncated: true` — narrow the window rather than assuming you saw everything. The journal is additionally read only to its last 20000 lines, reported as `scanned_lines`. | |
| since | No | Only what happened on or after this UTC date (YYYY-MM-DD, inclusive). A record whose own date cannot be read is excluded by a dated query rather than guessed into the window. Omitting it reads the 'daily' archive back only 12 months from `until` (or today); that section's `window` reports the dates it answered from and `defaulted: true`. Say `since` to reach further back. | |
| until | No | Only what happened on or before this UTC date (YYYY-MM-DD, inclusive). Earlier than `since` is refused. | |
| outcome | No | Only calls that ended this way: 'ok', 'platform_error' (the platform refused), 'exception', 'denied' (a policy gate), 'refused' (the exclusion preflight) or 'invalid_args'. Journal only — the other sources record no such field, and a filter they cannot answer is ignored by them rather than applied. | |
| sources | No | Which trails to read. Default ['action_log', 'journal']. 'daily' requires `platform` and 'reports' requires `kind`; both are refused without them rather than returned empty. | |
| batch_id | No | Only what belongs to this declared change set — the `action_log` entries stamped with it and the journal records made while it was open. | |
| platform | No | Platform key (google_ads / meta_ads / plugin:<dist>:<provider> / ...). Required by the 'daily' source. On `action_log` it matches the entry's platform exactly; on the journal it matches the call's family, and for a plugin key the distribution that served the tool — the journal records which distribution answered, not which of its providers, so two providers of one bridge cannot be told apart there. | |
| entity_id | No | The entity's id. Must be given together with `entity_type`. On the journal it is matched best-effort against the call's `<entity_type>_id`, `entity_id` or `id` argument. | |
| campaign_id | No | Campaign to filter on. Exact on `action_log`; on the journal a best-effort match against the call's `campaign_id` argument, since the journal records arguments rather than resolved entities. | |
| entity_type | No | Sub-campaign entity kind (ad_group / ad_set / placement / ...). Must be given together with `entity_id`. | |
| failures_only | No | Only calls whose outcome is not 'ok' — what was tried and did not happen. Journal only — the other sources record no such field, and a filter they cannot answer is ignored by them rather than applied. | |
| mutations_only | No | Only calls classified as mutations. Journal only — the other sources record no such field, and a filter they cannot answer is ignored by them rather than applied. |