MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / getMemoryToolDefinitions

Function getMemoryToolDefinitions

apps/webuiapps/src/lib/memoryManager.ts:29–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27// ---------------------------------------------------------------------------
28
29export function getMemoryToolDefinitions(): ToolDef[] {
30 return [
31 {
32 type: 'function',
33 function: {
34 name: 'save_memory',
35 description:
36 'Save an important piece of information about the user to long-term memory. ' +
37 'Use this when you learn something significant about the user that should be remembered across conversations. ' +
38 'Examples: user preferences, important facts, emotional moments, key events.',
39 parameters: {
40 type: 'object',
41 properties: {
42 content: {
43 type: 'string',
44 description: 'The memory content to save (concise, one key fact per call)',
45 },
46 category: {
47 type: 'string',
48 description:
49 'Category: "fact" (user facts), "preference" (likes/dislikes), "event" (what happened), "emotion" (emotional moments), "other"',
50 },
51 },
52 required: ['content', 'category'],
53 },
54 },
55 },
56 ];
57}
58
59export function isMemoryTool(toolName: string): boolean {
60 return toolName === 'save_memory';

Callers 1

runConversationFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected