Skip to main content
Glama

memory_handoff_fold

Destructive

Preview a curation-gated fold of memory captures, then apply a validated plan to keep the newest notes and archive the rest under a vault lock, with undo support.

Instructions

Preview a curation-gated fold, or apply a fresh preview plan.

apply=false (default) writes nothing and returns a deterministic plan_id plus the exact accepted/rejected image list. apply=true requires that plan_id, rechecks every image under the vault lock and commits; memory_review_undo restores the archived originals.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memory_handoff_fold"
  }
}

Input Schema

NameRequiredDescriptionDefault
keepNoretain the newest captures; latest is pinned
applyNo
plan_idNorequired for apply; copy from a preview's plan_id
task_keyNotask key, only with a project (default: $MNEMOSYNE_TASK_KEY)
project_keyNoproject key (default: $MNEMOSYNE_PROJECT_KEY)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description goes further by disclosing the two-phase safety model: previews are non-writing and deterministic, and applies recheck every image under the vault lock before committing. Reversibility via memory_review_undo is spelled out, which is exactly the context a destructive tool needs beyond its hints.

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?

The two-mode framing is front-loaded and nearly every clause carries information (default state, required token, lock behavior, undo path). Minor cost: 'curation-gated fold' is unexplained jargon and the mid-sentence line breaks slightly fragment the flow.

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?

With an output schema present, the description is not obliged to detail the returned plan and accepted/rejected lists, and it still sketches them for orientation. The remaining gap is what 'curation-gated' actually gates — whether a prior curation pass is a precondition — which an agent may need before choosing this tool over memory_curate.

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 coverage is 80%, so the schema already documents keep, plan_id, and the env-var defaults for task_key/project_key, and the description largely restates those semantics (default apply=false, plan_id needed for apply). It adds the useful constraint that plan_id must come from a preview, but says nothing about keep or the task/project scoping parameters that gate the fold.

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?

"Preview a curation-gated fold, or apply a fresh preview plan" gives a specific verb pair (preview/apply) and resource (fold of handoff history), and names the undo sibling that reverses an apply. It stops short of distinguishing itself from other mutation siblings such as memory_curate or memory_review_apply, so the reader still has to infer which write path to use.

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?

The description explicitly splits the two modes: apply=false (default) writes nothing, and apply=true requires the plan_id from a preview. It also names the recovery alternative (memory_review_undo restores archived originals), so both the selection rule and the escape hatch are stated rather than inferred.

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