Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYes
response_formatNojson

Implementation Reference

  • 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 };
    }
  • 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 })

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wmt-mobile/localnest'

If you have feedback or need assistance with the MCP directory API, please join our Discord server