Skip to main content
Glama
mnemostack
by udjin-labs

Mnemostack Invalidate

mnemostack_invalidate

Mark memories stale by ID without deleting or re-embedding them. Invalidated facts drop out of default recall but remain retrievable via include_invalidated or as_of.

Instructions

Mark memories stale by id, non-destructively.

A write tool (parallel to mnemostack_graph_add_triple). Sets invalidated_at (and optionally valid_until) on each point's payload without deleting or re-embedding it; invalidated facts drop out of default recall but stay reachable via include_invalidated / as_of. Points that do not exist are skipped. Pass index_root in multi-root collections to avoid marking another root's chunks stale. Returns ok, requested, and invalidated (the number of points actually updated).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ids": "<ids>"
    },
    "name": "mnemostack_invalidate"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesPoint id(s) to mark stale (string or integer)
index_rootNoOwner guard: when set, points owned by a different index_root are skipped, so one root cannot invalidate another's chunks in a shared collection.
valid_untilNoWorld-time the fact stopped being true (ISO-8601); optional, separate from the system-time invalidation stamp. Null preserves the stored value; clearing it is unsupported.
invalidated_atNoSystem-time stamp (ISO-8601); default: now (UTC)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.3.0
    • changedInput schema / properties / valid_until / description
      Previous value: -"World-time the fact stopped being true (ISO-8601); optional, separate from the system-time invalidation stamp."New value: +"World-time the fact stopped being true (ISO-8601); optional, separate from the system-time invalidation stamp. Null preserves the stored value; clearing it is unsupported."
  2. Addedv0.8.0

TDQS

A4.4/5.0
Behavior4/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 well: it discloses that nothing is deleted or re-embedded, that invalidated facts drop out of default recall but remain reachable, that non-existent points are skipped, and that index_root acts as an owner guard. It does not state whether re-invalidating an already-stale point counts in 'invalidated' (idempotency) or any auth requirement, so a 4 rather than 5.

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 semantics in the first sentence, then supporting behavior, then the return shape. Most sentences earn their place, though the closing 'Returns ok, requested, and invalidated' is partly redundant given an output schema exists.

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?

The tool has four parameters, full schema coverage, and an output schema, so the description only needs to cover behavior and selection guidance, which it does: mutation semantics, reachability, skip behavior, root-guarding, and the return contract are all addressed.

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, but the description adds genuine usage context beyond the schema: it explains why index_root matters in multi-root collections and frames valid_until as a world-time fact-validity bound distinct from the system-time invalidation stamp. That is meaning the schema text alone does not fully convey.

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 opening sentence names a specific verb (mark stale) and resource (memories by id) and immediately qualifies the semantics with 'non-destructively'. It also positions itself relative to a write sibling (mnemostack_graph_add_triple), so an agent can classify it as a write operation without opening the schema.

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?

It gives clear conditions for use: mark facts stale instead of deleting or re-embedding, reach them later via include_invalidated / as_of, and pass index_root in multi-root collections. It lacks an explicit 'do not use this when X' exclusion (e.g. use a delete/forget tool for real removal), which keeps it below a 5.

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