Skip to main content
Glama
mixelpixx

meMCP - Memory-Enhanced Model Context Protocol

memory_update_fact

Update stored knowledge in a persistent memory system for LLMs to maintain accurate information across sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

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,
        };
      }
    }
  • 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);
        }
      );
    }
  • 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);
    }
  • Top-level call to register all MemoryTools, including memory_update_fact, with the MCP server.
    await this.memoryTools.registerTools(server);

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/mixelpixx/meMCP'

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