mcp-kb-sqlite
v0.2.1Local long-term memory MCP server backed by SQLite FTS5
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
save
Create or update a KB entry. Two modes: UPDATE — pass id plus only the fields you want to change. Omitted fields keep their current value; pass "" (or [] for tags) to clear description/tags/data. ns/key/title can be changed but not cleared. Errors if no entry has that id. CREATE — omit id and pass ns, key, and title (all three required). Errors if ns+key is taken; the error reports the existing id so you can re-issue it as an update. ns = namespace like 'project/subsystem', key = unique slug within ns. title: short label. description: search-hint field — write…
| Parameter | Type | Description |
|---|---|---|
data | ||
description | ||
id | ||
key | ||
ns | ||
tags | ||
title |
get
Fetch a KB entry by id. Returns title, description, tags, and dates by default; pass include_data=True to also get the data payload. Also lists related entries.
| Parameter | Type | Description |
|---|---|---|
id * | integer | |
include_data | boolean |
search
FTS5/BM25 full-text search over title, description, tags, data. Optional ns prefix filter. Query is raw FTS5 syntax (AND/OR/NOT, "phrases", prefix*, col:term); hyphenated/dotted words (read-only, 127.0.0.1) are auto-quoted. Invalid syntax returns "Search failed: ..." text.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | |
ns | ||
offset | integer |
list
List entries (id, ns/key, title, updated_at). Optionally filter by ns prefix.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
ns | ||
offset | integer |
list_namespaces
List all namespaces with entry counts and last-updated date. Use this first to discover available projects/topics before calling search or list.
relate
Create or remove a typed relation between two entries. rel given or omitted (default: see_also) → add relation (INSERT OR IGNORE). Not validated — pick freely, but prefer these for consistency: see_also, part_of, caused_by, example_of. rel explicitly null → delete all relations between the pair (both directions).
| Parameter | Type | Description |
|---|---|---|
from_id * | integer | |
to_id * | integer | |
rel |
get_relations
Get all entries related to a given entry id (both directions).
| Parameter | Type | Description |
|---|---|---|
id * | integer |
replace
Targeted edit to an entry's `data` field without resending the whole value. old_string must match exactly against the current data. Errors if not found, or if it matches more than once — pass replace_all=True to replace every occurrence, or include more surrounding context in old_string to disambiguate a single occurrence (mirrors the Edit tool's semantics: self-verifying, no line-number tracking).
| Parameter | Type | Description |
|---|---|---|
id * | integer | |
new_string * | string | |
old_string * | string | |
replace_all | boolean |
delete
Delete a KB entry by id.
| Parameter | Type | Description |
|---|---|---|
id * | integer |