Skip to main content
Glama

memory_pre_compact

Persist and restore a session summary across /compact to prevent context loss. Use snapshot before and restore after.

Instructions

[alias of cuba_pre_compact] Compaction-survival protocol: persist and restore a session summary across /compact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYessnapshot: before /compact, persists a dense markdown summary (observations, decisions, unresolved errors, pending embeddings, goals) for the active session. restore: after /compact, retrieves the latest snapshot and re-injects it into context.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.25.0

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It indicates that data is persisted and restored, but does not disclose storage location, permissions, reversibility, side effects, or what exactly gets re-injected. This is a significant gap for a tool that writes and restores session state.

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?

The description is a single compact sentence with an alias tag. It is front-loaded and contains no redundant or filler language.

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 one-parameter enum tool with full schema description coverage and no output schema, the description sufficiently communicates the overall purpose and compaction timing. It is somewhat incomplete on behavioral and alternative-tool details, but the low parameter complexity makes that less critical.

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

Parameters3/5

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

Schema description coverage is 100%, and the single action parameter has a detailed enum description covering both snapshot and restore. The description itself adds little parameter detail beyond mapping 'persist' and 'restore' to the two actions, so the schema does the heavy lifting.

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

Purpose4/5

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

The description states a specific verb pair and resource: 'persist and restore a session summary across /compact.' It also identifies the tool as an alias of cuba_pre_compact. However, it does not explicitly differentiate itself from the many sibling memory_/cuba_ tools.

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?

The phrase 'across /compact' gives clear timing context for when the tool is relevant, and the schema enum description clarifies snapshot before /compact and restore after /compact. There are no explicit exclusions or named alternatives, but the usage context is clear.

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