Skip to main content
Glama

save_continuity

Validates and saves the compressed continuity file after prepare_wrap, enforcing four required sections, verifying citations against real episodes, and recording associations.

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. 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

TableJSON 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.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it enumerates the validation checks (structure, citation existence, explanation overlap, citation gaming, demotion), the side effects (Hebbian link creation, association decay), and the error behavior for a stale wrap_token. This is far beyond what a bare mutation verb would convey.

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?

Purpose and workflow placement are front-loaded in the first sentence, followed by validation and side-effect detail. Sentences are dense but each contributes distinct information; nothing is padding, though the enumeration could be tightened.

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?

For a 5-parameter mutation tool with no annotations and no output schema, the description covers prerequisites, required structure, validation semantics, side effects, and the shape of the return value (validation results, association metrics, section sizes). Nothing an agent needs to call it correctly 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?

Schema description coverage is 100%, so the schema already documents text, wrap_token, allow_shrink, allow_unlinked, and affective_state in detail. The description adds the 4-section structural requirement and the citation-grounding intent, but for each named parameter it largely parallels the schema, so the baseline 3 applies.

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') and immediately scopes the artifact ('the text must contain exactly 4 sections'). It is clearly distinguishable from the sibling prepare_wrap, which prepares rather than commits the wrap.

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?

Explicitly sequences usage: 'Call this after compressing your episodes using the instructions from prepare_wrap,' which names the prerequisite sibling. There is no when-not guidance or alternative-tool routing, but the placement in the workflow is unambiguous.

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