Skip to main content
Glama
agentmemory-codex-windows

agentmemory-codex-windows

memory_graph_purge

Irreversibly purges all graph nodes and edges for one exact project after a matching live inventory and required audit reason; no dry run, and it fails on dirty or changed snapshots.

Instructions

Irreversibly purge graph records for one exact project with a required audit reason. First obtain the complete live nodeIds/edgeIds inventory using memory_graph_query; a clean snapshot covering at most 500 nodes and 1000 edges across the graph is required. Inventories must match exactly; an empty project, partial/dirty/reset snapshot, changed records or oversized physical project fails with {success:false,error}. There is no dry run. Deletes project nodes including stale rows, incident/project edges, their edge history, indexes and archive metadata; preserves sessions, observations, memories and lessons. Returns {success,project,auditId,nodesDeleted,edgesDeleted,liveNodesDeleted,liveEdgesDeleted,archiveStatesRemoved,nodeIds,edgeIds,remainingNodes,remainingEdges}. Physical counts may exceed supplied live counts. Use memory_graph_provenance_reconcile for selective provenance correction or reversible edge retirement.

Input Schema

NameRequiredDescriptionDefault
reasonYesRequired audit reason for the destructive purge
edgeIdsYesExact complete live edge ID inventory returned for this project
nodeIdsYesExact complete node ID inventory returned for this project
projectYesExact registered project identifier

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-preview.14-glama.1

TDQS

A4.8/5.0
Behavior5/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 does: irreversibility, exact-match inventory requirement, failure cases with {success:false,error}, what is deleted (stale rows, incident/project edges, edge history, indexes, archive metadata) versus preserved (sessions, observations, memories, lessons), and the caveat that physical counts may exceed supplied live counts.

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-loads the irreversible action and required reason before the preconditions, and every clause carries operational weight. It is dense and somewhat run-on as a single paragraph, which costs some readability.

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

Completeness5/5

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

A destructive tool with no output schema and no annotations, yet the description enumerates the returned fields (success, auditId, deleted counts, archiveStatesRemoved, remaining counts), the failure envelope, and the preservation boundary. Nothing an agent needs in order to call it safely 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%, so baseline is 3, but the description adds critical semantics beyond the schema: nodeIds/edgeIds must be an exact complete live inventory, must match exactly, and are bounded at 500 nodes / 1000 edges. It does not add format detail for `project` or `reason`, keeping it just shy of a 5.

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 verb (purge), atomic resource (graph records), and narrow scope (one exact project) plus the required audit reason. It explicitly names memory_graph_query for inventory and memory_graph_provenance_reconcile for the selective/reversible alternative, so an agent can separate it from siblings without opening schemas.

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?

Gives a mandatory precondition (obtain the complete live inventory via memory_graph_query), states there is no dry run, and routes selective or reversible work to memory_graph_provenance_reconcile. Both the when-to-use and when-not-to-use cases are explicit.

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