Reference

MCP Tools Reference

All tools exposed by the MemoryLayer MCP server. These are available to any MCP-compatible agent.

Memory operations

memory_store

Store a new memory. Embeddings are generated locally — content never leaves your machine.

Parameters
contentstringrequiredThe text to remember
namespacestringoptionalLogical bucket for grouping memories (e.g. 'work', 'personal'). Defaults to 'default'
metadataobjectoptionalArbitrary key-value pairs attached to the memory
Returns

memory_id: string — the ID of the created memory

Example
// Store a preference
memory_store({
  content: "User prefers Python with type hints and black formatter",
  namespace: "preferences"
})
// → { memory_id: "mem_abc123", status: "stored" }
memory_search

Search memories using hybrid semantic + keyword retrieval with cross-encoder reranking. Returns the most relevant results.

Parameters
querystringrequiredNatural language search query
namespacestringoptionalRestrict search to this namespace. Searches all namespaces if omitted
top_knumberoptionalNumber of results to return. Default: 5, max: 20
min_scorenumberoptionalMinimum relevance score 0–1. Default: 0.0
Returns

Array of { memory_id, content, score, namespace, metadata, created_at }

Example
// Find coding preferences
memory_search({
  query: "what are the user's coding preferences?",
  namespace: "preferences",
  top_k: 3
})
// → [
//     { content: "User prefers Python...", score: 0.94, ... },
//     ...
//   ]
memory_get

Retrieve a specific memory by ID.

Parameters
memory_idstringrequiredThe ID returned by memory_store
Returns

Memory object with content, metadata, and timestamps

Example
memory_get({ memory_id: "mem_abc123" })
// → { memory_id: "mem_abc123", content: "...", namespace: "preferences", ... }
memory_update

Update an existing memory's content or metadata.

Parameters
memory_idstringrequiredThe ID of the memory to update
contentstringoptionalNew content (re-embeds automatically)
metadataobjectoptionalMetadata to merge (partial update)
Returns

Updated memory object

Example
memory_update({
  memory_id: "mem_abc123",
  content: "User prefers Python with type hints, black, and ruff"
})
memory_delete

Permanently delete a memory.

Parameters
memory_idstringrequiredThe ID of the memory to delete
Returns

{ status: "deleted" }

Example
memory_delete({ memory_id: "mem_abc123" })

Namespace operations

memory_list_namespaces

List all namespaces with memory counts.

Returns

Array of { namespace, count, last_updated }

Example
memory_list_namespaces()
// → [
//     { namespace: "preferences", count: 12, last_updated: "2025-05-01T..." },
//     { namespace: "work", count: 47, ... }
//   ]
memory_list

List memories in a namespace, sorted by recency.

Parameters
namespacestringoptionalNamespace to list. Defaults to 'default'
limitnumberoptionalMax results. Default: 20
offsetnumberoptionalPagination offset. Default: 0
Returns

Array of memory objects

Example
memory_list({ namespace: "work", limit: 10 })

Rate limits

PlanCalls/dayPrice
Free200$0
Pro2,000$19/mo
Pro+20,000$79/mo

Limits are per API key per UTC calendar day. Exceeded calls return a clear error message with an upgrade link.