Skip to main content
The core tools every connected agent shares — a remember / recall / list / resume / forget surface, and the entire MCP tool set (pure memory CRUD). They operate on your context memory and are scoped to you on every call.

save_context

Save something worth remembering across tools and sessions. Idempotent — saving the same content twice returns the same id with deduped: true.

Parameters

content
string
required
The thing to remember.
memory_type
string
default:"fact"
The canonical memory type, which drives retrieval behavior:
  • fact — atomic, stable knowledge (“the project uses GraphQL”).
  • event — something that happened at a time (a deployment, a decision).
  • instruction — how to do something (a procedure, workflow, runbook).
  • task — what’s being worked on right now. Ephemeral: it auto-expires after a TTL (7 days) and is swept on the next write. It’s still embedded, so it’s semantically retrievable while live.
Defaults to fact (a kind of decision defaults to event).
kind
string
default:"note"
Finer-grained display flavor: fact, decision, preference, or note.
topic
string
A stable topic this entry is about (e.g. deploy-schedule, editor-preference). A newer entry with the same topic supersedes older ones — latest wins. Use it when updating a fact the user stated before.
source_surface
string
Where this came from, e.g. claude-code, chatgpt, cursor.
tags
string[]
Optional freeform tags.

Returns

id
string
The id of the saved (or matched) entry.
deduped
boolean
true when the content already existed and was deduplicated.
Example result
{ "id": "ctx_8f2a…", "deduped": false }

save_session

Persist what a whole session taught — comprehensively. Pass the transcript or a digest and OneLamp distills it into the reusable facts, events, instructions, and tasks worth keeping, classifies each, and saves them (deduped). This is the comprehensive backstop to per-fact save_context, and matters most for tools without lifecycle hooks. Idle chatter and secrets are skipped.

Parameters

transcript
string
required
The session transcript, or a concise digest of everything durable the user revealed.
source_surface
string
Which tool this came from, e.g. claude-code, codex, cursor.

Returns

saved
number
New entries saved.
deduped
number
Items already known.
total
number
Items distilled from the session.
session_id
string
The id of the recorded session digest (present when anything durable was saved), for later resume_session.

get_context

Retrieve relevant context as a ranked pack of chunks (semantic + keyword + exact fact-key retrieval, fused with weighted RRF). Returns source material to reason over — not an answer. An empty store returns an empty pack, never an error.

Parameters

query
string
required
What to retrieve context about.
max_results
integer
default:"8"
Maximum context chunks to return (1–50).
memory_types
string[]
Restrict results to these memory types (fact, event, instruction, task) — e.g. just instruction for runbooks. Omit to retrieve across all types.
scope
string
default:"all"
Which context store(s) to read from: personal (your own), team (every team you belong to), team:<id> (one specific team you’re a member of), or all (personal + your teams, fused with personal winning ties). See Teams.
verified_only
boolean
default:"false"
If true, return only verified team learnings (ones a 2nd teammate has independently corroborated), dropping unverified and contested ones. Your personal context is always included. Default returns all, trust-weighted.
recency
boolean
default:"false"
If true, strongly favor the most recent context over the most relevant — for “what was I just working on” / “what’s the latest” reads. Default is relevance-ranked, with recency only as a tie-breaker.

Returns

packs
object[]
The ranked context chunks. Each pack has:
Example result
{
  "packs": [
    {
      "id": "ctx_8f2a…",
      "text": "Use pnpm, never npm",
      "kind": "preference",
      "memory_type": "fact",
      "source_surface": "claude-code",
      "ts": 1733500000000,
      "score": 0.8123
    }
  ]
}

list_context

Browse your saved memory, newest first — each item’s id, title, kind, memory_type, category, a short text preview, and cross-agent reuse (reuse_count and last_used_surface — how often it’s been retrieved and the tool that last used it). Use it to see what’s stored (e.g. to find an id to forget). For relevance-ranked retrieval use get_context.
limit
integer
default:"50"
Maximum items to list (1–200).

resume_session

Pick up cross-tool work where you left off. Each session digest is recorded by save_session in any tool, so this is the cross-agent handoff path. Without a session_id, returns your most recent sessions (recency-ranked). With one, loads that session in full — its label/summary and the learnings it produced.
session_id
string
Load one session in full by id (from a prior resume_session / save_session).
limit
integer
default:"5"
How many recent session digests to list (1–50). Ignored with session_id.
since
number
Only list sessions at/after this epoch-ms timestamp.
source_surface
string
Only list sessions from this surface, e.g. claude-code, cursor, codex.

forget_context

Delete one saved memory by id — completely and immediately (the index row, the R2 source, and the vector). Get the id from get_context or list_context. To instead replace a fact that changed, prefer save_context with a stable topic (supersession keeps history); use forget_context to remove for good.
id
string
required
The id of the memory to delete.
confirm
boolean
default:"true"
Pass false to preview the target without deleting it — returns what would be removed so you can confirm first.
forgotten
boolean
true if an entry was deleted; false if the id wasn’t found (or on a preview).
These tools embody OneLamp’s core principle: writes can dedupe and supersede, reads are retrieval-only, and your data is always exportable (export lives in the OneLamp web app, not as an agent tool). See Privacy & data ownership.