localnest_memory_delete
Delete a stored memory entry and all its revisions from the LocalNest MCP server to remove specific data while keeping processing local.
Instructions
Delete a stored memory entry and all of its revisions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| response_format | No | json |
Implementation Reference
- src/services/memory/entries.js:295-312 (handler)The implementation of the deleteEntry function which removes an entry, its revisions, and associated relations from the database.
export async function deleteEntry(store, id) { await store.init(); const existing = await getEntry(store, id); if (!existing) return { deleted: false, id }; await store.adapter.exec('BEGIN'); try { await store.adapter.run('DELETE FROM memory_relations WHERE source_id = ? OR target_id = ?', [id, id]); await store.adapter.run('DELETE FROM memory_revisions WHERE memory_id = ?', [id]); await store.adapter.run('DELETE FROM memory_entries WHERE id = ?', [id]); await store.adapter.exec('COMMIT'); } catch (error) { await store.adapter.exec('ROLLBACK'); throw error; } return { deleted: true, id }; } - src/mcp/tools/memory-store.js:155-170 (registration)Registration of the 'localnest_memory_delete' MCP tool, which calls memory.deleteEntry.
registerJsonTool( ['localnest_memory_delete'], { title: 'Memory Delete', description: 'Delete a stored memory entry and all of its revisions.', inputSchema: { id: z.string().min(1) }, annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false } }, async ({ id }) => normalizeDeleteResult(await memory.deleteEntry(id), { id })