Skip to main content
Glama

cuba_pre_compact

Save a session snapshot before /compact and re-inject it afterward, preventing loss of decisions, errors, goals, and context during compaction.

Instructions

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. Changed1 schema field changedv0.25.0
    • changedInput schema / properties / action / description
      Previous value: -"snapshot persists a session summary; restore returns the latest"New value: +"snapshot: 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."
  2. First observedv0.18.0

TDQS

A3.5/5.0
Behavior3/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 explains the core persist/restore behavior and the survival purpose, but does not disclose side effects, storage semantics, whether snapshots overwrite previous ones, or what exactly happens during restore beyond re-injection. This is adequate but incomplete for a stateful session tool.

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, front-loaded sentence with no wasted words. It states the protocol name and core operation immediately, and every phrase contributes to understanding what the tool does.

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?

For a simple one-parameter tool with a fully documented schema, the description covers the essential idea. However, with no output schema and no annotations, it should clarify return behavior for restore and differentiate from the sibling memory_pre_compact tool. The core is present, but important routing and output context is missing.

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?

The single action parameter has 100% schema description coverage, including detailed enum semantics for snapshot and restore. The tool description adds the conceptual 'compaction-survival' framing but no additional parameter syntax or format details beyond what the schema already provides, so the baseline score of 3 applies.

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 protocol and verb pair: persist and restore a session summary across /compact. It is clear what the tool does, but it does not differentiate itself from the sibling memory_pre_compact tool, leaving some ambiguity about which one an agent should choose.

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

Usage Guidelines3/5

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

The phrase 'across /compact' implies the usage window (before and after compaction), and the schema's action enum explains snapshot vs. restore timing in more detail. However, the description itself gives no explicit when-to-use guidance, no alternatives, and no exclusions relative to memory_pre_compact.

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