From d2cf31b42c1652f4e1b110af6443fc8f04a616dd Mon Sep 17 00:00:00 2001 From: Emir Karabeg Date: Tue, 20 May 2025 22:56:06 -0700 Subject: [PATCH] improvement(mem0): tool input options --- apps/sim/tools/mem0/add_memories.ts | 2 ++ apps/sim/tools/mem0/get_memories.ts | 3 +++ apps/sim/tools/mem0/search_memories.ts | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/sim/tools/mem0/add_memories.ts b/apps/sim/tools/mem0/add_memories.ts index 667befd81f..1966871fc2 100644 --- a/apps/sim/tools/mem0/add_memories.ts +++ b/apps/sim/tools/mem0/add_memories.ts @@ -11,11 +11,13 @@ export const mem0AddMemoriesTool: ToolConfig = { type: 'string', required: true, description: 'Your Mem0 API key', + requiredForToolCall: true, }, userId: { type: 'string', required: true, description: 'User ID associated with the memory', + optionalToolInput: true, }, messages: { type: 'json', diff --git a/apps/sim/tools/mem0/get_memories.ts b/apps/sim/tools/mem0/get_memories.ts index 5d53d20400..23389741bd 100644 --- a/apps/sim/tools/mem0/get_memories.ts +++ b/apps/sim/tools/mem0/get_memories.ts @@ -10,17 +10,20 @@ export const mem0GetMemoriesTool: ToolConfig = { apiKey: { type: 'string', required: true, + requiredForToolCall: true, description: 'Your Mem0 API key', }, userId: { type: 'string', required: true, description: 'User ID to retrieve memories for', + optionalToolInput: true, }, memoryId: { type: 'string', required: false, description: 'Specific memory ID to retrieve', + optionalToolInput: true, }, startDate: { type: 'string', diff --git a/apps/sim/tools/mem0/search_memories.ts b/apps/sim/tools/mem0/search_memories.ts index 0d6a0a07fd..6078351b6b 100644 --- a/apps/sim/tools/mem0/search_memories.ts +++ b/apps/sim/tools/mem0/search_memories.ts @@ -1,7 +1,8 @@ import { ToolConfig } from '../types' +import { Mem0Response } from './types' // Search Memories Tool -export const mem0SearchMemoriesTool: ToolConfig = { +export const mem0SearchMemoriesTool: ToolConfig = { id: 'mem0_search_memories', name: 'Search Memories', description: 'Search for memories in Mem0 using semantic search', @@ -10,11 +11,13 @@ export const mem0SearchMemoriesTool: ToolConfig = { apiKey: { type: 'string', required: true, + requiredForToolCall: true, description: 'Your Mem0 API key', }, userId: { type: 'string', required: true, + requiredForToolCall: true, description: 'User ID to search memories for', }, query: {