@knowall-ai/mcp-neo4j-agent-memory
Version:
Graph-based memory system for AI agents. Store people, places, organizations as nodes. Build semantic relationships (KNOWS, WORKS_AT, CREATED). Word-tokenized search finds partial matches. Filter by date, traverse relationships, maintain temporal context.
51 lines (50 loc) • 1.88 kB
JavaScript
export function isCreateMemoryArgs(args) {
return typeof args === 'object' && args !== null && typeof args.label === 'string' && typeof args.properties === 'object';
}
export function isSearchMemoriesArgs(args) {
if (typeof args !== 'object' || args === null)
return false;
const searchArgs = args;
if (searchArgs.query !== undefined && typeof searchArgs.query !== 'string')
return false;
if (searchArgs.since_date !== undefined && typeof searchArgs.since_date !== 'string')
return false;
return true;
}
export function isCreateConnectionArgs(args) {
return (typeof args === 'object' &&
args !== null &&
typeof args.fromMemoryId === 'number' &&
typeof args.toMemoryId === 'number' &&
typeof args.type === 'string');
}
export function isUpdateMemoryArgs(args) {
return (typeof args === 'object' &&
args !== null &&
typeof args.nodeId === 'number' &&
typeof args.properties === 'object');
}
export function isUpdateConnectionArgs(args) {
return (typeof args === 'object' &&
args !== null &&
typeof args.fromMemoryId === 'number' &&
typeof args.toMemoryId === 'number' &&
typeof args.type === 'string' &&
typeof args.properties === 'object');
}
export function isDeleteMemoryArgs(args) {
return (typeof args === 'object' &&
args !== null &&
typeof args.nodeId === 'number');
}
export function isDeleteConnectionArgs(args) {
return (typeof args === 'object' &&
args !== null &&
typeof args.fromMemoryId === 'number' &&
typeof args.toMemoryId === 'number' &&
typeof args.type === 'string');
}
export function isListMemoryLabelsArgs(args) {
// This tool doesn't require any arguments, so just check it's an object
return typeof args === 'object' && args !== null;
}