Skip to main content
Glama

Save & compact ZipMem memory

zipmem_save_and_compact

Compress and merge your session into long-term memory. Provide structured blueprints, file anchors, and lessons to preserve architectural facts and fixes without raw code.

Instructions

Compress the current session and merge it into long-term memory. CALL THIS when the user signals they are done (exit/quit/goodbye/wrap up) OR when you sense your context window is nearing capacity. Provide your work as structured sections: blueprints (verbatim architecture/schemas/decisions), anchors (file coordinates instead of raw code), and lessons (distilled bug fixes). Never include raw code blocks — use anchors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anchorsNoFile-coordinate anchors that replace raw code blocks.
lessonsNoBug resolutions and gotchas distilled into lessons learned.
blueprintsNoNew/updated architectural facts to preserve verbatim.
project_dirNoAbsolute path to the project root. Defaults to CLAUDE_PROJECT_DIR, then the nearest .zipmem/ ancestor, then cwd.
session_summaryYesOne paragraph: what was accomplished this session.
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses that the tool compresses and merges into long-term memory, and instructs to replace raw code with anchors and distill lessons. However, it does not describe side effects, reversibility, or persistence details, leaving some ambiguity about behavioral traits.

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

Conciseness5/5

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

Description is a single dense paragraph that efficiently conveys purpose, triggers, and content structure. Every sentence is meaningful and earns its place, with minimal redundancy.

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?

Given 5 parameters (1 required), no output schema, and no nested objects, the description covers purpose and usage well. It lacks explanation of return value or confirmation message, but the tool's action-oriented nature and detailed parameter guidance make it nearly complete.

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 description coverage is 100%, so baseline is 3. The description adds value by detailing how to structure content (blueprints, anchors, lessons) beyond the schema's descriptions, providing concrete guidance on parameter usage.

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?

Description clearly states the tool compresses the current session and merges it into long-term memory, with a specific verb ('compress', 'merge') and resource ('current session', 'long-term memory'). It also specifies when to call it (user done or context nearing capacity), which differentiates it from siblings like zipmem_checkpoint.

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

Usage Guidelines4/5

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

Explicit triggers are given: call when user signals done or when context window is nearing capacity. It also provides content structure instructions (blueprints, anchors, lessons). However, it does not mention when not to use or alternatives, but the triggers are clear enough for usage.

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/ahmetakyurt/zipmem-mcp'

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