memory_delete_fact
Remove specific stored facts from the persistent memory system to manage retained knowledge across LLM sessions.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "memory_delete_fact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core handler function that executes the tool logic: extracts factId, deletes the fact via factStore.deleteFact, and returns success or error response.
async handleDeleteFact(args) { try { const { factId } = args; await this.factStore.deleteFact(factId); return { content: [ { type: 'text', text: `✅ Fact ${factId} deleted successfully.`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error deleting fact: ${error.message}`, }, ], isError: true, }; } } - src/tools/modules/MemoryOperations.js:90-106 (registration)Registers the memory_delete_fact tool with the MCP server, including description, input schema, and reference to the handler function.
server.registerTool( 'memory_delete_fact', 'Delete a fact from the memory system', { type: 'object', properties: { factId: { type: 'string', description: 'The ID of the fact to delete', }, }, required: ['factId'], }, async (args) => { return await this.handleDeleteFact(args); } ); - JSON schema defining the input parameters for the tool: requires a 'factId' string.
{ type: 'object', properties: { factId: { type: 'string', description: 'The ID of the fact to delete', }, }, required: ['factId'], }, - src/tools/MemoryTools.js:23-29 (registration)Higher-level registration entry point that calls registerTools on MemoryOperations (which registers memory_delete_fact).
async registerTools(server) { // Register tools from modular components this.operations.registerTools(server); this.queryHandler.registerTools(server); this.streamingTools.registerTools(server); this.management.registerTools(server); } - src/tools/MemoryTools.js:14-15 (helper)Instantiates the MemoryOperations class with factStore and qualityScorer dependencies.
this.operations = new MemoryOperations(factStore, qualityScorer); this.queryHandler = new MemoryQueryHandler(factStore, processor);