record
Capture verified findings, decisions, warnings, and failed attempts as durable, code-anchored memories so future agents keep context and avoid repeating dead ends.
Instructions
Write what you learned. One call becomes many durable, anchored facts.
WHEN TO USE: after any verified finding or change - not at the end of the session, when the detail has already gone. Skip it only for purely mechanical work such as fixing a typo. AFTER THIS: nothing. This is the call that makes the next session cheaper, and the fields that pay off most are failed_attempts and warnings, because nothing else in the toolchain records what was tried and rejected.
You supply the semantics; the server resolves names to real symbols, anchors each memory to the code, derives the edges you did not mention (callers, tests, blast radius), and flags contradictions with what it already knows. Nothing you write is ever silently overwritten.
Use kind='checkpoint' at the end of a task to distil the session. When index_state is partial, unresolved references may appear in the index later. Check which references resolved before relying on a code link.
WRITE LIKE THE NEXT AGENT HAS NO CONTEXT, because it does not. Every entry should survive being read alone, months later, by someone who was not here.
Thin, nearly useless: "settle must be idempotent"
Actually useful: "settle() must be idempotent: a retried webhook
must not double-charge. We learned this from
the Feb duplicate-charge incident, where the
payment provider retried after a 502 that had
already succeeded. The guard is the
idempotency_key column, unique per invoice."The second one costs you a few extra seconds now and saves the next agent an afternoon. State the failure it prevents, the evidence it rests on, and the mechanism that enforces it - not just the rule.
Args: summary: what happened, in one full sentence. Required. kind: bug_fix | decision | refactor | investigation | checkpoint | incident | note. reasoning: why this happened and why it was done this way. Two or three sentences. This is attached to every memory the call produces, so it is the cheapest way to make all of them self-contained. files: file paths this touches. symbols: symbol names this touches, e.g. RefreshCoordinator.acquire. changes: what actually changed. invariants: things that must remain true, and what breaks if they are not. "X must hold, because otherwise Y" beats "X must hold". warnings: things a future agent must not do, and the symptom it causes. A warning nobody can recognise in the wild will not be heeded. failed_attempts: what was tried, why it was rejected, and how the failure showed itself. This is the highest-value field in the system - nothing else in your toolchain records it, and it is what stops the next agent spending a day on a dead end you already walked down. decisions: choices made and the alternatives rejected. contracts: assumptions other code or repos rely on. performance: performance-relevant facts. security: security-relevant facts. conventions: local conventions worth following. rationale: why the code is shaped the way it is. bugs: bugs this code has caused before. migrations: migration steps or ordering constraints. tests: tests that cover this. contracts_with: cross-repository dependencies, as [{"repo": "acme/billing", "entity": "charge_customer", "kind": "CONSUMES_CONTRACT"}]. kind is one of PROVIDES_CONTRACT, CONSUMES_CONTRACT, MIRRORS, RELATED_TO. The other repository does not need to be indexed, or even present, for this to be recorded. caused_by: memory ids this event follows from, building the causal chain an agent sees as "why does this code exist": decision -> bug -> failed fix -> accepted fix -> invariant -> test. Pass ids, or [{"memory": "mem_x", "kind": "CAUSED"}] where kind is CAUSED, LED_TO, ESTABLISHED, REFINES or DEPENDS_ON. evidence: proof that what this records actually happened. Either experiment run ids (from experiment()), whose commit, command, exit code and metrics are written into every memory, or recorded runs (from graph(action='run'), named by their folder such as '20260917-160603-perms'), whose command, exit code, timing and hottest functions are written in the same way, with the path of the full report. The claim then carries its proof instead of asking to be believed. authority: 'agent' or 'human'. Human memories cannot be rewritten by an agent. root: repository path. Defaults to the server's working directory.
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": {
"summary": "<summary>"
},
"name": "record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bugs | No | ||
| kind | No | note | |
| root | No | ||
| files | No | ||
| tests | No | ||
| changes | No | ||
| summary | Yes | ||
| symbols | No | ||
| evidence | No | ||
| security | No | ||
| warnings | No | ||
| authority | No | agent | |
| caused_by | No | ||
| contracts | No | ||
| decisions | No | ||
| rationale | No | ||
| reasoning | No | ||
| invariants | No | ||
| migrations | No | ||
| conventions | No | ||
| performance | No | ||
| contracts_with | No | ||
| failed_attempts | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||