Skip to main content
Glama

forget

Delete a memory by ID or fuzzy content match when the user requests forgetting.

Instructions

Delete a memory by ID or content match (fuzzy). Use when the user says to forget something.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoMemory ID (from inspect)
contentNoFuzzy content match

Implementation Reference

  • The handleForget function is the main handler that deletes a memory by ID (exact match) or content (fuzzy match using bigram similarity). It loads memories, filters based on id or content similarity, saves the filtered set, and returns the count of removed memories.
    function handleForget(args) {
      const { id, content } = args;
      if (!id && !content) return { error: 'Provide "id" or "content" to forget' };
    
      let memories = loadMemories();
      const before = memories.length;
    
      if (id) {
        memories = memories.filter(m => m.id !== id);
      } else {
        // Use similarity for fuzzy forget — lower threshold since user intent is clear
        const c = content.toLowerCase();
        memories = memories.filter(m => {
          if (m.content.toLowerCase().includes(c)) return false;
          if (similarity(content, m.content) > 0.25) return false;
          return true;
        });
      }
    
      saveMemories(memories);
      const removed = before - memories.length;
      return { removed, remaining: memories.length, message: `Forgot ${removed} memor${removed === 1 ? 'y' : 'ies'}.` };
    }
  • index.js:444-454 (registration)
    The 'forget' tool is registered in the tools/list response with name 'forget', description 'Delete a memory by ID or content match (fuzzy)', and inputSchema accepting optional 'id' (string) and 'content' (string) parameters.
    {
      name: 'forget',
      description: 'Delete a memory by ID or content match (fuzzy). Use when the user says to forget something.',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Memory ID (from inspect)' },
          content: { type: 'string', description: 'Fuzzy content match' }
        }
      }
    },
  • index.js:512-512 (registration)
    The 'forget' tool is dispatched in the 'tools/call' handler when the tool name is 'forget', calling handleForget(args).
    case 'forget': result = handleForget(args); break;
  • The handler uses loadMemories(), saveMemories(), and similarity() helper functions (defined elsewhere in the file) to manage memory persistence.
    }
    
    function handleForget(args) {
Behavior2/5

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

No annotations provided, so description carries full burden. Only states action (delete) and fuzzy matching, but does not disclose permanence, confirmation behavior, error handling, or what happens on multiple fuzzy matches.

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?

Two short sentences, no wasted words, directly conveys purpose and usage. Appropriate length for such a simple tool.

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?

Tool is simple with 2 optional params and no output schema. Description covers core action and usage trigger but omits return behavior, error cases, or confirmation messages.

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

Parameters3/5

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

Input schema has 100% description coverage for both parameters. Description adds minimal extra value ('id from inspect', 'fuzzy content match') but not enough to raise score above baseline 3.

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?

Description clearly states 'Delete a memory by ID or content match (fuzzy)', providing a specific verb and resource. It distinguishes from siblings like 'remember' (create) and 'recall' (retrieve) by focusing on deletion and fuzzy matching.

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

Usage Guidelines4/5

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

Explicitly says 'Use when the user says to forget something', which is a clear usage context. However, no guidance on when not to use or alternatives like 'update' or 'clear all'.

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/ShipItAndPray/mcp-memory'

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