purge_ai_log
[MAINTENANCE] c0168425 — Project-scoped, cutoff-based retention sweep spanning BOTH ai_log_events (meridian.db.ai_log.purge_events_before) and their stored artifacts (meridian.artifact_store.purge_artifacts_before) in one call, with a single receipt. Deletes every event/artifact strictly older th...
This record as markdown: /tools/io-github-ajc3xc-meridian/purge-ai-log.md
What purge_ai_log does on Meridian
AI agents call purge_ai_log to permanently remove resources in Meridian, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
cutoff | string | Yes | ISO-8601 UTC datetime, e.g. '2025-01-01T00:00:00Z'. Events/artifacts recorded strictly before this are deleted. |
project_id | string | — | |
project_name | string | — | Project name — an alternative to project_id; resolved to the id internally. project_id wins if both are given. |
Parameters from the server's own tool schema.
Why purge_ai_log is rated Critical
An AI agent that decides to call purge_ai_log doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from Meridian is gone. There is no undo for destructive operations.
Attacks that exploit this kind of access
The rule that runs purge_ai_log safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Meridian, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For purge_ai_log, this is the rule to start with:
purge_ai_log is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Meridian, apply this rule, and every purge_ai_log call is checked against it from then on.
Questions about purge_ai_log
[MAINTENANCE] c0168425 — Project-scoped, cutoff-based retention sweep spanning BOTH ai_log_events (meridian.db.ai_log.purge_events_before) and their stored artifacts (meridian.artifact_store.purge_artifacts_before) in one call, with a single receipt. Deletes every event/artifact strictly older than cutoff (an ISO-8601 UTC datetime, e.g. '2025-01-01T00:00:00Z') for the given project. Irreversible — this is a hard bulk delete, not a soft archive (call export_ai_log / export_ai_log_artifacts first if the data needs to survive the sweep). Returns {project_id, cutoff, events_deleted, artifacts_deleted, purged_at}. Persistent-state disclosure: on hosted Meridian, supplied text and project/session metadata are sent to and stored in Meridian's service; self-hosted deployments keep them in the configured local SQLite/Postgres database. This data is visible in the dashboard/API and later project context or handoffs. Delete individual tasks, notes, or decisions where supported, or delete the project/account using the documented controls. Do not include secrets. It is categorised as a Destructive tool in the Meridian MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
purge_ai_log accepts 3 parameters: cutoff, project_id, project_name. Required: cutoff. The full parameter table on this page comes from the server's own tool schema.
Register the Meridian MCP server in PolicyLayer and add a rule for purge_ai_log: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Meridian. Nothing to install.
purge_ai_log is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the purge_ai_log rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for purge_ai_log. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
purge_ai_log is provided by the Meridian MCP server (@meridianmcp/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Meridian, and thousands of servers like it.
Across the catalogue