Skip to main content
Glama

set_memory_bank_path

Define or update the custom path for the Memory Bank in mcp-with-ssh, ensuring centralized knowledge storage and access via SSH. Use the command to specify a directory or default to the current one.

Instructions

Set a custom path for the Memory Bank

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoCustom path for the Memory Bank. If not provided, the current directory will be used.

Implementation Reference

  • The handler function that executes the set_memory_bank_path tool logic by setting a custom path for the Memory Bank using the MemoryBankManager.
    export async function handleSetMemoryBankPath(
      memoryBankManager: MemoryBankManager,
      customPath?: string
    ) {
      // Use the provided path, project path, or the current directory
      const basePath = customPath || memoryBankManager.getProjectPath();
      
      // Ensure the path is absolute
      const absolutePath = path.isAbsolute(basePath) ? basePath : path.resolve(process.cwd(), basePath);
      console.error('Using absolute path for Memory Bank:', absolutePath);
      
      // Set the custom path and check for a memory-bank directory
      await memoryBankManager.setCustomPath(absolutePath);
      
      // Check if a memory-bank directory was found
      const memoryBankDir = memoryBankManager.getMemoryBankDir();
      if (memoryBankDir) {
        return {
          content: [
            {
              type: 'text',
              text: `Memory Bank path set to ${memoryBankDir}`,
            },
          ],
        };
      }
      
      // If we get here, no valid Memory Bank was found
      return {
        content: [
          {
            type: 'text',
            text: `Memory Bank not found in the provided directory. Use initialize_memory_bank to create one.`,
          },
        ],
      };
    }
  • The schema definition for the set_memory_bank_path tool, including name, description, and input schema, part of the coreTools array.
    {
      name: 'set_memory_bank_path',
      description: 'Set a custom path for the Memory Bank',
      inputSchema: {
        type: 'object',
        properties: {
          path: {
            type: 'string',
            description: 'Custom path for the Memory Bank. If not provided, the current directory will be used.',
          },
        },
        required: [],
      },
    },
  • The switch case registration that routes calls to the set_memory_bank_path handler in the MCP server's tool request handler.
    case 'set_memory_bank_path': {
      const { path: customPath } = request.params.arguments as { path?: string };
      return handleSetMemoryBankPath(memoryBankManager, customPath);
    }
  • Registers the list of tools including coreTools (which contains set_memory_bank_path schema) for the MCP list tools request.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        ...coreTools,
        ...progressTools,
        ...contextTools,
        ...decisionTools,
        ...modeTools,
      ],
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool sets a path but does not explain what happens after setting (e.g., if it persists across sessions, requires restart, or affects other operations). For a mutation tool with zero annotation coverage, this is a significant gap in transparency regarding side effects or requirements.

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, direct sentence that states the tool's purpose without any fluff or redundancy. It is front-loaded and efficiently communicates the core action, making it highly concise and well-structured for quick understanding.

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 tool's complexity as a mutation operation with no annotations and no output schema, the description is incomplete. It does not cover behavioral aspects like persistence, error handling, or how it interacts with sibling tools (e.g., 'initialize_memory_bank'). For a tool that modifies system state, more context is needed to ensure safe and correct usage by an agent.

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

Parameters3/5

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

The schema description coverage is 100%, with the parameter 'path' clearly documented in the input schema as a string for a custom path, defaulting to the current directory if not provided. The description adds no additional meaning beyond what the schema provides, so it meets the baseline score of 3 for adequate but not enhanced parameter semantics.

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 action ('Set') and the resource ('custom path for the Memory Bank'), making the purpose immediately understandable. However, it does not differentiate this tool from potential siblings like 'initialize_memory_bank' or 'update_active_context', which might involve related path or configuration operations, so it falls short of 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 Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, such as whether the Memory Bank must be initialized first, or compare it to sibling tools like 'initialize_memory_bank' or 'switch_mode' that might affect paths or settings. This lack of context leaves the agent guessing about 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