Skip to main content
Glama

get_buckets

Retrieve all available buckets from the Memory Box MCP Server to organize and access stored memories efficiently using meaning-based search capabilities.

Instructions

Retrieve a list of all available buckets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP server tool call handler case for 'get_buckets'. Invokes the MemoryBoxClient.getBuckets() method and formats the list of buckets into a human-readable text response.
    case "get_buckets": {
      // Get all available buckets
      const result = await memoryBoxClient.getBuckets();
      
      // Format the results
      let responseText = "Available buckets:\n\n";
      
      if (result.items && result.items.length > 0) {
        result.items.forEach((bucket: any, index: number) => {
          responseText += `${index + 1}. ${bucket.name} (ID: ${bucket.id})`;
          
          // Add memory count if available
          if (bucket.memory_count !== undefined) {
            responseText += ` - ${bucket.memory_count} memories`;
          }
          
          // Add creation date if available
          if (bucket.created_at) {
            responseText += ` - Created: ${bucket.created_at}`;
          }
          
          responseText += "\n";
        });
      } else {
        responseText += "No buckets found.";
      }
      
      return {
        content: [{
          type: "text",
          text: responseText
        }]
      };
    }
  • Core helper method in MemoryBoxClient class that performs the HTTP GET request to the Memory Box API endpoint /api/v2/buckets to retrieve the list of available buckets, with proper error handling.
    async getBuckets(): Promise<any> {
      try {
        const response = await axios.get(
          `${this.baseUrl}/api/v2/buckets`,
          {
            headers: {
              "Authorization": `Bearer ${this.token}`
            }
          }
        );
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new McpError(
            ErrorCode.InternalError,
            `Failed to get buckets: ${error.response?.data?.detail || error.message}`
          );
        }
        throw error;
      }
    }
  • src/index.ts:774-783 (registration)
    Tool registration entry in the ListTools response, defining the 'get_buckets' tool name, description, and input schema (no parameters required).
    {
      name: "get_buckets",
      description: "Retrieve a list of all available buckets",
      inputSchema: {
        type: "object",
        properties: {
          // No specific parameters needed for this operation
        }
      }
    },
  • Input schema definition for the 'get_buckets' tool, specifying an empty object schema since no parameters are required.
    inputSchema: {
      type: "object",
      properties: {
        // No specific parameters needed for this operation
      }
    }
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. It states the tool retrieves a list, implying a read-only operation, but doesn't disclose behavioral traits like whether it requires authentication, has rate limits, returns paginated results, or what format the list takes. This is inadequate for a tool with zero annotation coverage.

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, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, earning a perfect score for conciseness.

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 doesn't explain what the returned list contains (e.g., bucket names, IDs, metadata), how it's structured, or any prerequisites for use. For a tool with no structured data to rely on, this leaves significant gaps for an agent.

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 tool has zero parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to add parameter semantics, so it meets the baseline of 4 for a parameterless tool.

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 verb ('Retrieve') and resource ('list of all available buckets'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_bucket_memories' or 'get_all_memories', which prevents 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. With siblings like 'get_bucket_memories' (for memories in a specific bucket) and 'get_all_memories' (for all memories regardless of bucket), the agent lacks context for choosing appropriately.

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/amotivv/memory-box-mcp'

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