Skip to main content
Glama

Memory bank write-ahead log (audit / rollback)

memory_wal

Inspect and manage the WAL audit log of memory-bank writes, detect anomalies, and create or restore filesystem snapshots for rollback.

Instructions

Inspect or manage the memory-bank WAL (JSONL audit log and snapshots).

USE WHEN: You need an audit trail of memory-bank writes, anomaly hints, or a filesystem snapshot/restore of .cortex/memory-bank/*.md (not a git substitute).

DO NOT: Treat WAL as authoritative security auditing; it is best-effort and can be disabled by disk errors (writes still proceed).

EXAMPLES:

  • memory_wal(operation="read") — last 50 WAL entries

  • memory_wal(operation="anomalies") — heuristic warnings

  • memory_wal(operation="snapshot", label="backup-2026-04-15")

  • memory_wal(operation="restore", label="backup-2026-04-15")

Pre-compact automation: there is no bundled Claude PreCompact hook in this repo; run memory_wal(operation="snapshot", label="pre-compact-…") manually before risky compaction if you want a rollback point.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo
sinceNo
operationNoread
Behavior4/5

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

Annotations are minimal (readOnlyHint=false, destructiveHint=false, etc.). The description adds behavioral context: WAL is best-effort, can be disabled by disk errors, and writes still proceed even if WAL fails. This provides useful transparency beyond the annotations, though some behaviors (e.g., restore overwrites) are not fully detailed.

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?

The description is well-structured with sections and front-loaded purpose. However, it includes somewhat tangential information about the PreCompact hook and repo bundling, which could be trimmed. Overall, it is clear and fairly concise.

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

Completeness3/5

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

Given the tool has 3 parameters (0 required, 0% schema description coverage) and no output schema, the description covers operations and use cases but does not explain return values or output format. For a log-inspection tool, information about the structure of returned entries (e.g., anomaly hint format) would improve completeness.

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

Parameters2/5

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

Schema coverage is 0%; the description does not define parameters beyond examples. While 'operation', 'label', and 'since' are used in examples, their types, constraints, and default values are not described. The schema provides some structure (anyOf, defaults), but the description adds minimal semantic value. For 0% coverage, this is insufficient.

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?

The description clearly states the tool inspects/manages the memory-bank WAL, lists specific operations (read, anomalies, snapshot, restore), and distinguishes itself from git. The verb-resource combination is specific and actionable.

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?

Provides explicit 'USE WHEN' and 'DO NOT' guidance, including context about audit trails and that WAL is not a security auditing tool. Also informs about the absence of a built-in PreCompact hook, steering users to manual snapshot use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/igrechuhin/Cortex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server