Skip to main content
Glama
IncomeStreamSurfer

Roo Code Memory Bank MCP Server

check_memory_bank_status

Verify if the memory-bank directory exists and retrieve a list of .md files to maintain persistent project context in AI assistants.

Instructions

Checks if the memory-bank directory exists and lists the .md files within it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that checks the memory-bank directory existence and lists .md files within it, returning JSON status.
    async checkMemoryBankStatus(): Promise<{ content: Array<{ type: string; text: string }>; isError?: boolean }> {
       try {
          await fs.access(MEMORY_BANK_PATH);
          const files = await fs.readdir(MEMORY_BANK_PATH);
          const mdFiles = files.filter(f => f.endsWith('.md'));
          return { content: [{ type: "text", text: JSON.stringify({ exists: true, files: mdFiles }, null, 2) }] };
       } catch (error) {
          // If access fails, directory likely doesn't exist
          return { content: [{ type: "text", text: JSON.stringify({ exists: false, files: [] }, null, 2) }] };
       }
    }
  • src/index.ts:268-269 (registration)
    Switch case in CallToolRequestHandler that registers and dispatches the tool call to the handler.
    case "check_memory_bank_status":
      return memoryBankServer.checkMemoryBankStatus();
  • Tool definition including name, description, and input schema (empty object since no input params required).
    const CHECK_MEMORY_BANK_STATUS_TOOL: Tool = {
      name: "check_memory_bank_status",
      description: "Checks if the memory-bank directory exists and lists the .md files within it.",
      inputSchema: { type: "object", properties: {} } // No input needed
      // Output: { exists: boolean, files: string[] } (handled in implementation)
    };
  • src/index.ts:110-115 (registration)
    Array of all tools including CHECK_MEMORY_BANK_STATUS_TOOL, used for listing tools.
    const ALL_TOOLS = [
      INITIALIZE_MEMORY_BANK_TOOL,
      CHECK_MEMORY_BANK_STATUS_TOOL,
      READ_MEMORY_BANK_FILE_TOOL,
      APPEND_MEMORY_BANK_ENTRY_TOOL
    ];
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool's actions (checking directory existence and listing .md files), which is helpful, but doesn't cover aspects like error handling (e.g., what happens if the directory doesn't exist), performance characteristics, or output format details. This leaves gaps in understanding how the tool behaves in edge cases.

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 a single, clear sentence that efficiently conveys the tool's purpose without unnecessary words. It is front-loaded with the main action ('Checks if...') and includes all relevant details (directory existence and file listing) in a compact form, making it easy to understand at a glance.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is somewhat complete but could be improved. It explains what the tool does, but without an output schema, it doesn't detail the return format (e.g., whether it returns a boolean, list, or structured data). For a status-checking tool, more information on output behavior would enhance completeness.

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 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose. Since there are no parameters to explain, this meets expectations, but a perfect score is reserved for cases where the description adds value beyond an already complete schema, which isn't applicable here.

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

Purpose4/5

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

The description clearly states the tool's purpose with specific verbs ('checks if... exists' and 'lists... files') and identifies the resource ('memory-bank directory' and '.md files'). It distinguishes from siblings by focusing on status checking rather than appending, initializing, or reading specific files. However, it doesn't explicitly contrast with sibling tools, keeping it from a perfect score.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning what the tool does (checking existence and listing files), which suggests it's for verifying the memory bank's state. However, it lacks explicit guidance on when to use this tool versus alternatives like 'initialize_memory_bank' or 'read_memory_bank_file', and doesn't specify any prerequisites or exclusions, leaving usage decisions somewhat ambiguous.

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

Related 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/IncomeStreamSurfer/roo-code-memory-bank-mcp-server'

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