MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / execute

Method execute

src/tools/builtin/memory.ts:47–55  ·  view source on GitHub ↗
(args: z.infer<typeof RememberArgs>, ctx: ToolContext)

Source from the content-addressed store, hash-verified

45 argsSchema = RememberArgs;
46
47 async execute(args: z.infer<typeof RememberArgs>, ctx: ToolContext): Promise<ToolResult> {
48 const cwd = ctx.cwd ?? process.cwd();
49 const scope = args.scope ?? 'project';
50 getSessionStore().addFact(ctx.sessionId, cwd, args.fact, scope);
51 const { exportMemory } = await import('../../context/memory-mirror.js');
52 await exportMemory(cwd); // keep the human-readable MEMORY.md mirror in sync (best-effort)
53 const where = scope === 'user' ? 'all projects (user memory)' : cwd;
54 return { content: `Remembered for ${where}:\n ${args.fact}` };
55 }
56}
57
58const RecallArgs = z.object({

Callers

nothing calls this directly

Calls 3

getSessionStoreFunction · 0.85
exportMemoryFunction · 0.85
addFactMethod · 0.80

Tested by

no test coverage detected