> ## Documentation Index
> Fetch the complete documentation index at: https://help.flickwise.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Context tools

> save_context, save_session, get_context, list_context, resume_session, forget_context.

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](https://help.flickwise.app/concepts/context-memory.md) 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.

**project** `string`

Target a [project](https://help.flickwise.app/concepts/projects.md) (a named context bucket) by its **id or
slug**. The entry lands in that project instead of your personal context; omit
for personal.

### Returns

**id** `string`

The id of the saved (or matched) entry.

**deduped** `boolean`

`true` when the content already existed and was deduplicated.

```json Example result theme={null}
{ "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`.

**project** `string`

Distill the session into a [project](https://help.flickwise.app/concepts/projects.md) (id or slug) instead of
your personal context. Omit for personal.

### 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`](#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](https://help.flickwise.app/concepts/teams.md).

**project** `string`

Read from a [project](https://help.flickwise.app/concepts/projects.md) (id or slug). The project is **fused
with your always-on personal context** (personal is the base), exactly as teams
fuse — so a project read still surfaces relevant personal context. Omit for
personal only.

**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:

**pack fields**

**id** `string`

The chunk's id.

**text** `string`

The context text.

**kind** `string`

The entry kind (`fact`, `decision`, …).

**memory\_type** `string`

The memory type (`fact`, `event`, `instruction`, `task`).

**source\_surface** `string`

Where it was saved from.

**ts** `number`

Save timestamp.

**score** `number`

Relevance score.

**scope** `string`

Which store it came from (`personal` / `team:<id>`).

**contributed\_by** `string`

Team packs only: the member who promoted it.

**trust** `string`

Team packs only: `verified` / `unverified` / `contested`.

```json Example result theme={null}
{
  "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).

**project** `string`

List a [project](https://help.flickwise.app/concepts/projects.md)'s items (id or slug) instead of personal.
Omit for personal.

## resume\_session

Pick up cross-tool work where you left off. Each session digest is recorded by
[`save_session`](#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.

**project** `string`

Delete from a [project](https://help.flickwise.app/concepts/projects.md) (id or slug) instead of personal.
Omit for personal.

**forgotten** `boolean`

`true` if an entry was deleted; `false` if the id wasn't found (or on a preview).

> [!NOTE]
>
> 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](https://help.flickwise.app/concepts/privacy.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.