memory_update_fact
Update stored knowledge in a persistent memory system for LLMs to maintain accurate information across sessions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function that implements the core logic of the 'memory_update_fact' tool. It calls this.factStore.updateFact(factId, updates) and formats the response.async handleUpdateFact(args) { try { const { factId, updates } = args; const updatedFact = await this.factStore.updateFact(factId, updates); return { content: [ { type: 'text', text: `✅ Fact updated successfully!\n\n**ID:** ${updatedFact.id}\n**Updated:** ${updatedFact.updatedAt}\n\n**Content:** ${updatedFact.content}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error updating fact: ${error.message}`, }, ], isError: true, }; } }
- src/tools/modules/MemoryOperations.js:65-87 (registration)Registers the 'memory_update_fact' tool with the server, providing the tool name, description, input schema, and handler function.registerUpdateFactTool(server) { server.registerTool( 'memory_update_fact', 'Update an existing fact in the memory system', { type: 'object', properties: { factId: { type: 'string', description: 'The ID of the fact to update', }, updates: { type: 'object', description: 'The updates to apply to the fact', }, }, required: ['factId', 'updates'], }, async (args) => { return await this.handleUpdateFact(args); } ); }
- src/tools/MemoryTools.js:23-29 (registration)The registerTools method in MemoryTools that calls registerTools on MemoryOperations (among others), propagating the tool registration.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/core/SequentialGraphitiIntegration.js:82-82 (registration)Top-level call to register all MemoryTools, including memory_update_fact, with the MCP server.await this.memoryTools.registerTools(server);