Skip to main content
Glama
shaneholloman

mcp-knowledge-graph

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

TableJSON Schema
NameRequiredDescriptionDefault

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: {},
            },
          },
  • 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) }] };
  • 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;
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses database types, naming conventions, and the structure of the return object. No behavioral traits like side effects or permissions are mentioned, but the tool appears read-only and harmless.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (DATABASE TYPES, RETURNS, EXAMPLES). Every sentence adds meaningful information, and the format is easily scannable. No fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and no output schema, the description fully covers what the tool does, what it returns, and provides an example usage. It is sufficient for an agent to invoke correctly without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so the baseline is 4. Description adds value by explaining database types and the return format, which helps the agent understand the output without needing explicit parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'list' and clearly identifies the resource as 'available memory databases and show current storage location'. It distinguishes itself from sibling tools that perform mutations or queries on individual memories.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Use this to discover what databases exist before querying them', providing clear context for when to invoke this tool. No exclusions or alternatives are given, but the single use case is well-defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shaneholloman/mcp-knowledge-graph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server