Skip to main content
Glama
knowall-ai

Neo4j Agent Memory MCP Server

by knowall-ai

update_memory

Modify existing memory properties to add details or make corrections when new information becomes available in the Neo4j graph database.

Instructions

Update properties of an existing memory such as adding more detail or make a change when you find out something new

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesID of the memory to update
propertiesYesProperties to update/add

Implementation Reference

  • The handler function executes the 'update_memory' tool by validating the input arguments and calling neo4j.updateNode to update the memory node in the graph, then returning the result as JSON text.
    case 'update_memory': { if (!isUpdateMemoryArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid update_memory arguments'); } const result = await neo4j.updateNode(args.nodeId, args.properties); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Registration of the 'update_memory' tool in the tools array, including name, description, and JSON input schema for MCP.
    { name: 'update_memory', description: 'Update properties of an existing memory such as adding more detail or make a change when you find out something new', inputSchema: { type: 'object', properties: { nodeId: { type: 'number', description: 'ID of the memory to update', }, properties: { type: 'object', description: 'Properties to update/add', additionalProperties: true, }, }, required: ['nodeId', 'properties'], }, },
  • TypeScript interface defining the structure of arguments for the update_memory tool.
    export interface UpdateMemoryArgs { nodeId: number; properties: Record<string, any>; }
  • Type guard function for validating update_memory arguments at runtime in the handler.
    export function isUpdateMemoryArgs(args: unknown): args is UpdateMemoryArgs { return ( typeof args === 'object' && args !== null && typeof (args as UpdateMemoryArgs).nodeId === 'number' && typeof (args as UpdateMemoryArgs).properties === 'object' ); }

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/knowall-ai/mcp-neo4j-agent-memory'

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