Save to Brain
brain_saveSaves decisions, bug fixes, patterns, and lessons to a local knowledge base so future agents can recall context; use state_key to replace outdated current-value facts.
Instructions
Save a decision, bug fix, pattern, or lesson to a local knowledge base. Call this whenever you make a decision, fix a bug, learn something non-obvious, or the user corrects you. Write the content for a future agent with zero context about this session. Use state_key for current-value facts so a later save replaces the earlier value.
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": {
"content": "<content>"
},
"name": "brain_save"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Tags: an array, or a comma-separated string | |
| title | No | Short title, max 60 chars. When omitted, the content's first line becomes the title | |
| content | Yes | The full note. Write for a future agent with zero context. When it replaces an older note, start with SUPERSEDES <id> and that note is archived. | |
| project | No | Project name (e.g. web-app). Omit for a note that applies everywhere | |
| category | No | Category of the note (default: thought) | |
| metadata | No | Additional structured data | |
| state_key | No | For a CURRENT-VALUE fact that will change later (a setting, a status, an owner), pass a key like config:theme. Saving under the same key archives the previous value, so search returns only the current one. Namespaces: config, status, pricing, policy, stack, vendor, infra, person. Omit it for anything that stays true once it happened: an event, a decision, a lesson. |