memory_delete_fact
Remove specific facts from LLM memory to ensure accuracy and relevance in responses, maintaining up-to-date knowledge within the memory-enhanced system.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function that implements the tool logic: extracts factId, calls 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)The registration of the 'memory_delete_fact' tool, including its 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); } );
- The 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'],