Skip to main content
Glama

restore_memory

Undo a trash_memory call by restoring a curated memory file from its one-time token, returning it to its original path so references by address work again.

Instructions

MUTATING: undo a trash_memory call by restoring one curated memory file from its restore token. Writes to local disk and appends to the change timeline. The file returns to its original path with its address and history intact, so references by address resume working. A token is single-use and only valid for the tree it was issued against, so a spent or foreign token fails without changing anything. Restoring is only possible while the token is known: there is no way to browse trash from MCP. Parameters: restore_token is the exact token returned by the trash_memory call being undone; project_path project root whose memory tree the operation applies to. Omit it to use the machine-wide tree, and always omit it when this server was started pinned to a project. Returns an object with the restored address, path, and revision id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoProject root whose memory tree the operation applies to. Omit it to use the machine-wide tree, and always omit it when this server was started pinned to a project.
restore_tokenYesRestore token returned by a prior trash_memory call, identifying the file to restore.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.13
    • addedInput schema / properties / project_path / description
      Added value: +"Project root whose memory tree the operation applies to. Omit it to use the machine-wide tree, and always omit it when this server was started pinned to a project."
    • addedInput schema / properties / restore_token / description
      Added value: +"Restore token returned by a prior trash_memory call, identifying the file to restore."
  2. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

The description richly discloses behavior beyond the annotations: it is mutating (writes to disk, appends to timeline), tokens are single-use and tree-scoped, failure modes are non-destructive (spent/foreign token fails without changing anything), and it returns an object with address, path, and revision id. This far exceeds the minimal annotation information.

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 front-loaded with the key action ('MUTATING: undo a trash_memory call') and then provides focused, necessary details in a logical order. Every sentence adds value, and the parameter explanations are concise yet comprehensive.

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 mutating restore operation with no output schema, the description covers the full lifecycle: what it does, side effects, failure modes, parameter semantics, and return value. It is complete enough for an agent to invoke correctly and anticipate outcomes.

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

Parameters5/5

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

While the schema already covers both parameters, the description adds crucial semantics: restore_token must be the exact token from a prior trash_memory call, and project_path carries a special omission rule when the server is pinned. This clarifies usage beyond the schema descriptions.

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?

The description clearly states the specific action: 'undo a trash_memory call by restoring one curated memory file from its restore token.' It names the exact resource (curated memory file) and distinguishes itself from siblings by being the inverse of trash_memory.

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?

It explicitly frames the tool as undoing a trash_memory call, making the trigger condition clear. It also provides guidance on when to omit project_path (pinned server case) and notes that there is no way to browse trash from MCP, helping the agent decide whether this is the right tool.

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