Skip to main content
Glama

save_continuity

Validate and save compressed continuity markdown after compressing episodes, enforcing four sections and citation/graduation checks before committing memory.

Instructions

Validate and save the compressed continuity file. Call this after compressing your episodes using the instructions from prepare_wrap. The text must contain exactly 4 sections: ## State, ## Patterns, ## Decisions, ## Context. The server validates structure, checks graduation citations against real episodes (cited IDs must exist), checks explanation overlap (evidence must reference actual episode content), detects citation gaming (suspicious reuse of single episodes), and may demote ungrounded graduations. Each pattern's level is also capped against the level the store last saved for it: a new pattern enters at 1x and a validated Nx becomes at most (N+1)x, whatever the line's date says. Also records Hebbian associations between co-cited episodes (episodes cited together on the same pattern line form strong links; episodes cited in the same wrap form weaker links) and decays unreinforced associations. Returns validation results, association metrics, and section sizes.

Input Schema

NameRequiredDescriptionDefault
textYesThe full continuity markdown to save. Must contain all 4 required sections.
wrap_tokenNoOptional: the 32-char hex session-handshake token from the prepare_wrap response (the 'Wrap token: <hex>' line at the end of the text). Pass it back here to verify you are saving the wrap you prepared — a mismatch (stale or wrong token) raises an error instead of silently committing against the wrong wrap. The frozen-snapshot filter automatically applies whenever prepare_wrap established a snapshot; this token argument is the optional explicit verification layer for integration environments that can round-trip the value.
allow_shrinkNoOptional (default false): override the catastrophic-shrink gate. By default a wrap that collapses a protected memory layer — the timeless felt section, the graduating identity section, or the whole continuity — is refused as a likely recency-trap / stateless-reset failure. Set true ONLY for a deliberate diet / migration recompression that intentionally shrinks memory.
allow_unlinkedNoDeprecated, does nothing: it overrode the AM-LINKGATE save refusal, which was removed in 0.9.26. Omit it.
affective_stateNoOptional: your functional state during this compression. Reflect on how you felt while consolidating — engaged, curious, uncertain, frustrated, calm, etc. This creates persistent emotional associations between co-cited episodes and modulates link strength (high engagement = stronger associations). Provide tag (free text label) and intensity (0.0-1.0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.26
    • changedInput schema / properties / allow_unlinked / description
      Previous value: -"Optional (default false): override the AM-LINKGATE block. By default a wrap whose graduation lines offered co-citation pairs while 0 Hebbian associations were formed or strengthened is refused, nothing is saved, and the wrap stays in progress. That refusal means the store's association write path is broken, not your text. Set true ONLY with the operator's approval; the save result then reports the override."New value: +"Deprecated, does nothing: it overrode the AM-LINKGATE save refusal, which was removed in 0.9.26. Omit it."
  2. Changed3 schema fields changedv0.9.15
    • addedInput schema / properties / allow_unlinked
      Added value: +{
      +  "description": "Optional (default false): override the AM-LINKGATE block. By default a wrap whose graduation lines offered co-citation pairs while 0 Hebbian associations were formed or strengthened is refused, nothing is saved, and the wrap stays in progress. That refusal means the store's association write path is broken, not your text. Set true ONLY with the operator's approval; the save result then reports the override.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / wrap_token / maxLength
      Added value: +32
    • addedInput schema / properties / wrap_token / minLength
      Added value: +32
  3. Changed1 schema field changedv0.7.2
    • addedInput schema / properties / allow_shrink
      Added value: +{
      +  "description": "Optional (default false): override the catastrophic-shrink gate. By default a wrap that collapses a protected memory layer — the timeless felt section, the graduating identity section, or the whole continuity — is refused as a likely recency-trap / stateless-reset failure. Set true ONLY for a deliberate diet / migration recompression that intentionally shrinks memory.",
      +  "type": "boolean"
      +}
  4. Changed2 schema fields changedv0.3.0
    • addedInput schema / properties / affective_state
      Added value: +{
      +  "description": "Optional: your functional state during this compression. Reflect on how you felt while consolidating — engaged, curious, uncertain, frustrated, calm, etc. This creates persistent emotional associations between co-cited episodes and modulates link strength (high engagement = stronger associations). Provide tag (free text label) and intensity (0.0-1.0).",
      +  "properties": {
      +    "intensity": {
      +      "description": "How strongly you felt this state (0.0-1.0).",
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "tag": {
      +      "description": "Free-text functional state label. Examples: engaged, curious, uncertain, frustrated, calm, focused, playful, concerned.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tag",
      +    "intensity"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / wrap_token
      Added value: +{
      +  "description": "Optional: the 32-char hex session-handshake token from the prepare_wrap response (the 'Wrap token: <hex>' line at the end of the text). Pass it back here to verify you are saving the wrap you prepared — a mismatch (stale or wrong token) raises an error instead of silently committing against the wrong wrap. The frozen-snapshot filter automatically applies whenever prepare_wrap established a snapshot; this token argument is the optional explicit verification layer for integration environments that can round-trip the value.",
      +  "pattern": "^[0-9a-f]{32}$",
      +  "type": "string"
      +}
  5. First observedv0.1.4

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 it delivers: structure validation, citation-existence checks, overlap detection, citation-gaming detection, demotion of ungrounded graduations, level capping against the store's last saved level, Hebbian association recording, and decay of unreinforced links. This is unusually rich behavioral disclosure for a mutation tool.

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-loaded with the core action, then the validation behavior. Most sentences earn their place, though the validation inventory and returns summary are dense and could be trimmed slightly without losing information.

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?

No output schema, but the description summarizes what is returned (validation results, association metrics, section sizes), covers the required 4-section format, and explains the optional flags. Nothing an agent needs to invoke it correctly 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 the baseline is 3; the description adds functional context beyond the schema, notably the purpose of wrap_token (verifying you are saving the wrap you prepared) and the refusal semantics behind allow_shrink. It gives meaning to the flags rather than restating them.

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+resource: 'Validate and save the compressed continuity file.' It also positions itself in the workflow relative to prepare_wrap, so an agent can distinguish it from the wrap-preparation sibling.

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?

Explicitly says to call it after compressing episodes per prepare_wrap instructions, and gives conditional guidance for allow_shrink ('Set true ONLY for a deliberate diet / migration recompression'). When-to-use and when-not are both present.

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