Skip to main content
Glama
deleteMemory.ts1.19 kB
// Memory management tool - completely independent import { MemoryManager } from '../../lib/MemoryManager.js'; import { ToolResult, ToolDefinition } from '../../types/tool.js'; 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'] } }; 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'}` }] }; } }

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/ssdeanx/ssd-ai'

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