Skip to main content
Glama

list_memory_bank_files

Retrieve a list of files stored in the memory bank on the MCP server with SSH support for centralized knowledge management.

Instructions

List Memory Bank files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
random_stringYesDummy parameter for no-parameter tools

Implementation Reference

  • The handler function that executes the list_memory_bank_files tool by listing files in the Memory Bank using memoryBankManager.listFiles() and returning the formatted list.
    export async function handleListMemoryBankFiles(
      memoryBankManager: MemoryBankManager
    ) {
      try {
        const files = await memoryBankManager.listFiles();
    
        return {
          content: [
            {
              type: 'text',
              text: `Files in Memory Bank:\n${files.join('\n')}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error listing Memory Bank files: ${error}`,
            },
          ],
          isError: true,
        };
      }
    }
  • The schema definition for the list_memory_bank_files tool, including name, description, and inputSchema with a dummy required parameter.
    {
      name: 'list_memory_bank_files',
      description: 'List Memory Bank files',
      inputSchema: {
        type: 'object',
        properties: {
          random_string: {
            type: 'string',
            description: 'Dummy parameter for no-parameter tools',
          },
        },
        required: ['random_string'],
      },
  • The switch case in the CallToolRequestHandler that dispatches to the handleListMemoryBankFiles function after checking if Memory Bank exists.
    case 'list_memory_bank_files': {
      if (!memoryBankManager.getMemoryBankDir()) {
        return {
          content: [
            {
              type: 'text',
              text: 'Memory Bank not found. Use initialize_memory_bank to create one.',
            },
          ],
          isError: true,
        };
      }
      return handleListMemoryBankFiles(memoryBankManager);
  • Registers the tool schemas, including list_memory_bank_files from coreTools, for the ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        ...coreTools,
        ...progressTools,
        ...contextTools,
        ...decisionTools,
        ...modeTools,
      ],
    }));
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states the action 'List Memory Bank files', failing to cover critical aspects such as whether this is a read-only operation, potential side effects, authentication needs, rate limits, or output format. This is inadequate for a tool with no annotation support, leaving the agent uninformed about its behavior.

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 extremely concise at three words, with no wasted text. It is front-loaded and directly states the tool's action without unnecessary elaboration, making it efficient for quick understanding. However, this conciseness comes at the cost of completeness, but it scores high on this dimension alone.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It does not explain what 'List' entails (e.g., format, pagination, filtering) or how it relates to sibling tools. For a tool with no structured support, more context is needed to guide the agent effectively, making this insufficient for reliable use.

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 1 parameter with 100% description coverage, documenting it as a 'Dummy parameter for no-parameter tools'. The description adds no parameter information, but since the schema fully covers the single parameter and it's a dummy, this is acceptable. The baseline is 3 for high schema coverage, but the dummy nature elevates it as no meaningful parameters need explanation.

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

Purpose2/5

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

The description 'List Memory Bank files' restates the tool name 'list_memory_bank_files' with minimal elaboration, making it tautological. It specifies the verb 'List' and resource 'Memory Bank files', but lacks differentiation from sibling tools like 'read_memory_bank_file' or details on scope (e.g., all files, filtered). This is a basic restatement that provides little additional insight.

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

Usage Guidelines1/5

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

The description offers no guidance on when to use this tool versus alternatives. It does not mention sibling tools such as 'read_memory_bank_file' for reading specific files or 'get_memory_bank_status' for status checks, nor does it provide context like prerequisites or exclusions. This leaves the agent without direction on appropriate usage scenarios.

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/aakarsh-sasi/memory-bank-mcp'

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