Skip to main content
Glama

Memory Delete

localnest_memory_delete
DestructiveIdempotent

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaNo

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 })
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds valuable behavioral context beyond annotations by specifying that 'all of its revisions' are deleted, clarifying the full scope of the destructive operation. It aligns with destructiveHint=true and idempotentHint=true without contradicting annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is perfectly front-loaded with the critical action and scope. Every word earns its place—'stored memory entry' identifies the resource and 'all of its revisions' defines the deletion scope without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter destructive operation, the description covers core behavior adequately given the presence of annotations and output schema. However, it misses opportunities to warn about the permanent nature of the deletion (beyond annotations) or explain parameter semantics, landing at minimum viable completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fails to compensate by explaining what 'id' refers to (memory entry ID format) or the purpose of 'response_format.' While 'id' is somewhat inferable from context, the lack of parameter documentation is a significant gap given the schema provides no descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description provides a specific verb ('Delete'), clear resource ('stored memory entry'), and scope clarification ('all of its revisions'). The mention of revisions effectively distinguishes this from siblings like localnest_memory_remove_relation or localnest_memory_update.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description implies this is the permanent removal option via 'all of its revisions,' it lacks explicit guidance on when to use this versus alternatives like localnest_memory_update or localnest_memory_remove_relation. No prerequisites (e.g., 'requires the memory ID from list') are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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