Skip to main content
Glama

delete_memory

DestructiveIdempotent

Remove specific stored data from the Hi-AI MCP server by specifying a memory key to delete unwanted or outdated information.

Instructions

잊어|삭제해|지워|forget|delete|remove|erase - Delete specific memory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesMemory key to delete

Implementation Reference

  • The main execution handler for the 'delete_memory' tool. It takes a memory key, uses MemoryManager to delete it, and returns success or failure message.
    export async function deleteMemory(args: { key: string }): Promise<ToolResult> {
      const { key: deleteKey } = args;
    
      try {
        const mm = MemoryManager.getInstance();
        const deleted = mm.delete(deleteKey);
    
        if (deleted) {
          return {
            content: [{ type: 'text', text: `✓ Deleted memory: "${deleteKey}"` }]
          };
        } else {
          return {
            content: [{ type: 'text', text: `✗ Memory not found: "${deleteKey}"` }]
          };
        }
      } catch (error) {
        return {
          content: [{ type: 'text', text: `✗ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }]
        };
      }
    }
  • ToolDefinition schema defining input (key: string), description, and annotations (destructive, idempotent) for 'delete_memory' tool.
    export const deleteMemoryDefinition: ToolDefinition = {
      name: 'delete_memory',
      description: '잊어|삭제해|지워|forget|delete|remove|erase - Delete specific memory',
      inputSchema: {
        type: 'object',
        properties: {
          key: { type: 'string', description: 'Memory key to delete' }
        },
        required: ['key']
      },
      annotations: {
        title: 'Delete Memory',
        audience: ['user', 'assistant'],
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: true,
        openWorldHint: false
      }
    };
  • src/index.ts:160-166 (registration)
    Registration of delete_memory handler (and related memory tools) in the toolHandlers object for dynamic tool dispatch.
    // Memory - Basic
    'save_memory': saveMemory,
    'recall_memory': recallMemory,
    'update_memory': updateMemory,
    'delete_memory': deleteMemory,
    'list_memories': listMemories,
    'prioritize_memory': prioritizeMemory,
  • src/index.ts:93-99 (registration)
    Inclusion of deleteMemoryDefinition in the tools array, making it discoverable via ListTools.
    // Memory Management - Basic (6)
    saveMemoryDefinition,
    recallMemoryDefinition,
    updateMemoryDefinition,
    deleteMemoryDefinition,
    listMemoriesDefinition,
    prioritizeMemoryDefinition,
  • src/index.ts:45-45 (registration)
    Import statement bringing in the deleteMemoryDefinition and deleteMemory handler from its module.
    import { deleteMemoryDefinition, deleteMemory } from './tools/memory/deleteMemory.js';
Behavior4/5

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

Annotations already indicate destructiveHint=true (irreversible deletion) and idempotentHint=true (safe to retry), which the description doesn't contradict. The description adds value by emphasizing the action with synonyms ('forget', 'erase'), reinforcing the destructive nature beyond annotations. However, it doesn't detail side effects (e.g., impact on linked memories) or error conditions, leaving some behavioral gaps.

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 description is extremely concise and front-loaded, using a compact format with synonyms separated by pipes. Every element ('잊어|삭제해|지워|forget|delete|remove|erase - Delete specific memory') serves to clarify the action without redundancy. It efficiently communicates the core purpose in minimal words, with no wasted sentences.

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?

Given the tool's complexity (destructive operation with one parameter), annotations cover key behavioral traits (destructive, idempotent), and schema fully describes the input. However, there's no output schema, and the description doesn't explain return values or error handling. For a deletion tool, more context on outcomes (e.g., confirmation message, failure modes) would improve completeness, but it's minimally adequate.

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?

Schema description coverage is 100%, with the parameter 'key' fully documented in the schema. The description doesn't add any parameter-specific details beyond what the schema provides, such as format examples or constraints. This meets the baseline score of 3 for high schema coverage, but no extra semantic value is contributed.

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

Purpose4/5

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

The description clearly states the action ('delete') and resource ('specific memory'), making the purpose understandable. It provides multilingual synonyms ('잊어|삭제해|지워|forget|delete|remove|erase') which enhances clarity for diverse users. However, it doesn't explicitly differentiate from sibling tools like 'update_memory' or 'prioritize_memory', which would require a more specific scope statement.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing memory key), exclusions, or comparisons to siblings like 'remove' operations in other tools. Usage is implied through the action verbs but lacks explicit context for selection.

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/su-record/hi-ai'

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