Skip to main content
Glama

memory_store

Destructive

Create, update, link, or bulk-create thoughts in a persistent knowledge graph, with confirm-gated previews before destructive edge changes.

Instructions

Store and modify thoughts. Single objects answer { item, meta }, batches { items, meta } with counters in meta.counts; a preview sets meta.preview={token,destructive:true}. Actions: create; update (tags merge by default, tags_mode=replace overwrites); link; link_batch and unlink_batch (up to 1000 edges each, one transaction, one row per occurrence; unlink_batch confirm-gated); unlink and retype (preview→confirm, unlink dry-run by default, retype returns both edge ids); bulk_create (up to 10000 thoughts). A write returns compact thoughts unless you read the row back with memory_recall compact=false.

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": {
      "action": "<action>"
    },
    "name": "memory_store"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory — resolves the project a "create" lands in and the project scope meta.scope reports (always pass for "create"/"update"). ACCEPTED AND IGNORED for "link", "link_batch", "unlink", "unlink_batch", "retype".
tagsNoOPTIONAL for "create" and "update" (update merges with existing tags by default; use tags_mode=replace to overwrite the whole tag set). REJECTED for "link", "link_batch", "unlink", "unlink_batch", "retype".
linksNoREQUIRED ONLY for "link_batch". Edges to create as {source, target, type?} pairs (1-1000); partial failures are reported per item. REJECTED for all other actions.
actionYesThe specific action to perform. This dictates which other parameters are required.
statusNoThought status (draft/active/archived). OPTIONAL for "create" and "update"; "update" rejects "archived" (archive through memory_supersede action=archive). REJECTED for "link", "link_batch", "unlink", "unlink_batch", "retype".
confirmNoCONSUMED by "unlink", "unlink_batch", "retype" (true executes the write; false/omitted is a dry-run). REJECTED for all other actions.
contentNoREQUIRED for "create". OPTIONAL for "update". REJECTED for "link", "link_batch", "unlink", "unlink_batch", "retype". Recommended soft limit: 600 chars.
edge_idNoREQUIRED for "unlink" and "retype". The edge to modify. REJECTED for all other actions.
edge_idsNoREQUIRED ONLY for "unlink_batch". Edge IDs to delete/preview in one call (1-1000); partial failures are reported per item. REJECTED for all other actions.
new_typeNoREQUIRED for "retype". The new edge type. REJECTED for all other actions.
thoughtsNoREQUIRED ONLY for "bulk_create". Thoughts to create in one run-level transaction with a savepoint per item, so a failing item does not roll back its neighbours (1-10000 items, the same bound this schema enforces). VALIDATED before the action runs, so a present thoughts must be a non-empty array of valid items whatever the action — an empty array is refused with "thoughts is required for bulk_create action". REJECTED for all other actions. Each item is a strict object taking the create item fields — content (required), tags, status, parent_id, is_protected, is_global, url_links — plus project_id, relation and source; url_links is written per item in array order in the same transaction, and is_global reaches the row. Failure splits two ways: a schema-level refusal (an unknown key, a wrong type, the retired is_profile) drops the whole call and writes nothing, while a per-item failure (e.g. a parent_id that does not exist) yields that item's error row at its index and the rest of the batch commits. The top-level content/tags/status/parent_id/is_protected/is_global/url_links are rejected for "bulk_create" (each item carries its own).
edge_typeNoEdge type (default: related). OPTIONAL for "link". REJECTED for "create", "update", "link_batch", "unlink", "unlink_batch", "retype".
is_globalNoMark as global thought (appears in all project-scoped searches). OPTIONAL for "create" and "update". REJECTED for "link", "link_batch", "unlink", "unlink_batch", "retype".
parent_idNoParent thought ID. OPTIONAL for "create". REJECTED for all other actions.
source_idNoREQUIRED ONLY for "link" (source endpoint, same spelling as memory_supersede merge). REJECTED for all other actions.
tags_modeNoupdate only: how to apply `tags` — "merge" (default) unions with existing tags, "replace" overwrites the whole tag set. REJECTED for all other actions.
target_idNoREQUIRED ONLY for "link" (target side, same spelling as memory_supersede merge). REJECTED for all other actions.
url_linksNoURL links. OPTIONAL for "create" and "update": create sets the initial list, update replaces the whole set in array order (an omitted field leaves the set untouched, [] clears it). The array order is the link order. For "bulk_create" each item carries its own url_links with these semantics, so this top-level field is rejected for it. REJECTED for all other actions.
is_profileNoRetired: remove this field; there is no replacement.
project_idNoRemoved; a create takes the project its cwd resolves to.
thought_idNoREQUIRED for "update". REJECTED for "link" (use source_id). REJECTED for "create", "link_batch", "unlink", "unlink_batch", "retype".
is_protectedNoProtect from auto-deletion. OPTIONAL for "create" and "update". REJECTED for "link", "link_batch", "unlink", "unlink_batch", "retype".
preview_tokenNoOPTIONAL preview token returned by a prior preview. CONSUMED by "unlink" and "retype" (true executes with token validation; missing/stale fails). REJECTED for all other actions.
surface_afterNoupdate only: pending surfacing delay as an ISO timestamp (UTC, e.g. 2026-01-01T00:00:00.000Z); pass null to clear. REJECTED for all other actions.

Output Schema

NameRequiredDescriptionDefault
resultYesAction payload (structuredContent.result); JSON mirror of content[].text, except the raw-text config action, whose result is { item: { text }, meta }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With destructiveHint=true already declared, the description still adds meaningful behavior: batch calls run in one transaction with one row per occurrence, previews carry meta.preview={token,destructive:true} and must be confirmed with a token, unlink defaults to dry-run, and writes come back compact unless reread. It does not cover permissions or rate limits, and batch partial-failure semantics live mostly in the schema rather than here.

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?

It is front-loaded with the return shape and action inventory, and every clause carries operational fact with no filler. It is dense to the point of being a run-on with semicolon-separated fragments, which slightly hurts scannability but not content value.

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?

For a 8-action, 24-parameter tool, the description covers the action set, default behaviors, confirm gating, batch limits, and return shape, and an output schema exists so return values need not be spelled out further. The only real gap is guidance on choosing among create/bulk_create and neighboring memory tools.

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 earns the extra point by restating non-obvious semantics from the action surface — tags merge vs tags_mode=replace overwriting, unlink_batch confirming, retype returning both edge ids, and the per-action size caps. It adds interpretation rather than merely repeating field names.

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?

"Store and modify thoughts" gives a specific verb and resource, and the action list (create, update, link, link_batch, unlink, unlink_batch, retype, bulk_create) tells an agent exactly what operations are bundled here. It stops short of explicitly distinguishing itself from siblings beyond the one read-back hint at memory_recall, so it is clear but not fully differentiated.

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 states real operating conditions: unlink is dry-run by default, unlink_batch is confirm-gated, and preview→confirm is the safe path, plus batch bounds (1000 edges, 10000 thoughts). It also routes the agent to memory_recall compact=false when full rows are needed. What is missing is an explicit statement of when to prefer create vs bulk_create or which sibling to use for non-storing tasks.

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