aim_memory_list_stores
Lists all available memory databases and shows current storage location. Use to discover existing databases before querying them.
Instructions
List all available memory databases and show current storage location.
DATABASE TYPES:
"default": The master database (memory.jsonl) - used when no context is specified
Named databases: Created via context parameter (e.g., "work" -> memory-work.jsonl)
RETURNS: {project_databases: [...], global_databases: [...], current_location: "..."}
project_databases: Databases in .aim directory (if project detected)
global_databases: Databases in global --memory-path directory
current_location: Where operations will default to
Use this to discover what databases exist before querying them.
EXAMPLES:
aim_memory_list_stores() - Shows all available databases and current storage location
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.ts:783-803 (registration)Tool 'aim_memory_list_stores' is registered in the ListToolsRequestSchema handler with name, description, and inputSchema (no parameters).
name: "aim_memory_list_stores", description: `List all available memory databases and show current storage location. DATABASE TYPES: - "default": The master database (memory.jsonl) - used when no context is specified - Named databases: Created via context parameter (e.g., "work" -> memory-work.jsonl) RETURNS: {project_databases: [...], global_databases: [...], current_location: "..."} - project_databases: Databases in .aim directory (if project detected) - global_databases: Databases in global --memory-path directory - current_location: Where operations will default to Use this to discover what databases exist before querying them. EXAMPLES: - aim_memory_list_stores() - Shows all available databases and current storage location`, inputSchema: { type: "object", properties: {}, }, }, - index.ts:852-853 (handler)The tool handler for 'aim_memory_list_stores' invokes knowledgeGraphManager.listDatabases() and returns the result as JSON.
case "aim_memory_list_stores": return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.listDatabases(), null, 2) }] }; - index.ts:335-377 (helper)The listDatabases() method on KnowledgeGraphManager scans project-local .aim directory and global memory-path directory for .jsonl files, listing both sets of databases along with the current storage location.
async listDatabases(): Promise<{ project_databases: string[], global_databases: string[], current_location: string }> { const result = { project_databases: [] as string[], global_databases: [] as string[], current_location: "" }; // Check project-local .aim directory const projectRoot = findProjectRoot(); if (projectRoot) { const aimDir = path.join(projectRoot, '.aim'); if (existsSync(aimDir)) { result.current_location = "project (.aim directory detected)"; try { const files = await fs.readdir(aimDir); result.project_databases = files .filter(file => file.endsWith('.jsonl')) .map(file => file === 'memory.jsonl' ? 'default' : file.replace('memory-', '').replace('.jsonl', '')) .sort(); } catch (error) { // Directory exists but can't read - ignore } } else { result.current_location = "global (no .aim directory in project)"; } } else { result.current_location = "global (no project detected)"; } // Check global directory try { const files = await fs.readdir(baseMemoryPath); result.global_databases = files .filter(file => file.endsWith('.jsonl')) .map(file => file === 'memory.jsonl' ? 'default' : file.replace('memory-', '').replace('.jsonl', '')) .sort(); } catch (error) { // Directory doesn't exist or can't read result.global_databases = []; } return result; }