Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
kindNoWhich report kind's history to read. Required when `sources` includes 'reports', and refused without it.
pathNoOptional path to STATE.json. Defaults to STATE.json in the MCP server's current working directory. Paths outside it are refused.
toolNoOnly 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.
limitNoEntries 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`.
sinceNoOnly 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.
untilNoOnly what happened on or before this UTC date (YYYY-MM-DD, inclusive). Earlier than `since` is refused.
outcomeNoOnly 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.
sourcesNoWhich trails to read. Default ['action_log', 'journal']. 'daily' requires `platform` and 'reports' requires `kind`; both are refused without them rather than returned empty.
batch_idNoOnly what belongs to this declared change set — the `action_log` entries stamped with it and the journal records made while it was open.
platformNoPlatform 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_idNoThe 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_idNoCampaign 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_typeNoSub-campaign entity kind (ad_group / ad_set / placement / ...). Must be given together with `entity_id`.
failures_onlyNoOnly 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_onlyNoOnly 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.20.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden, and it delivers: it discloses that journal holds even denied and failed calls which action_log 'correctly never holds', that daily merges archived and in-document days, and that limit applies per source with each section reporting truncation. This goes well beyond the name and schema. It stops short of covering auth needs or an explicit read-only declaration, but for a local read tool these are minor.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose ('Read the PAST') and concrete examples before any mechanics. It is dense — a long block with parentheticals — but for a 15-parameter, four-source tool nearly every clause carries information; there is no filler. Slightly more paragraphing or bullet structure would push it to 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex read tool with no annotations and no output schema, the description covers the essentials: what the four sources hold, how filters scope per source, per-source limits and truncation reporting, and the division of labor with mureo_state_get. The schema's parameter descriptions fill in the rest (window defaulting, the 20000-line journal scan, cross-parameter requirements). A response-shape overview beyond truncation flags would improve it, but nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with unusually rich per-parameter descriptions, so the baseline is 3. The description adds value the schema lacks by defining what each source contains — curated action_log entries with their full-log index, the journal as every call with outcome, a merged daily series, report versions — which gives meaning to the source-related filters. The per-source limit and truncation semantics are already echoed in the schema's limit description, so the marginal addition is mostly source semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action — 'Read the PAST' — and a clear scope: anything STATE.json no longer holds. Concrete examples ('what was changed on a campaign in July', 'daily spend from before the 35-day retention window') anchor the intent, and it distinguishes itself from mureo_state_get by naming it directly. The four sources are enumerated, so the agent knows the resource surface.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the alternative and the decision rule: 'Use mureo_state_get for the CURRENT state of the document; use this for what it no longer holds.' Also frames when the tool applies ('any question that reaches beyond what STATE.json currently holds') and notes cross-source constraints that gate usage (daily requires platform, reports requires kind).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools