Skip to main content
Glama

delete_bucket

Remove a bucket from the Memory Box MCP Server. Specify the bucket name to delete; optionally use force to delete even when it contains memories.

Instructions

Delete a bucket (empty by default, use force to delete with content)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_nameYesName of the bucket to delete
forceNoForce deletion even if bucket contains memories (default: false)

Implementation Reference

  • Core implementation of bucket deletion: sends HTTP DELETE request to Memory Box API endpoint `/api/v2/buckets/{bucketName}` with optional force parameter, handles errors with McpError.
    async deleteBucket(bucketName: string, force: boolean = false): Promise<any> {
      try {
        const response = await axios.delete(
          `${this.baseUrl}/api/v2/buckets/${bucketName}`,
          {
            params: { force },
            headers: {
              "Authorization": `Bearer ${this.token}`
            }
          }
        );
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new McpError(
            ErrorCode.InternalError,
            `Failed to delete bucket: ${error.response?.data?.detail || error.message}`
          );
        }
        throw error;
      }
    }
  • Input schema definition for the delete_bucket tool, specifying required 'bucket_name' string and optional 'force' boolean.
      name: "delete_bucket",
      description: "Delete a bucket (empty by default, use force to delete with content)",
      inputSchema: {
        type: "object",
        properties: {
          bucket_name: {
            type: "string",
            description: "Name of the bucket to delete"
          },
          force: {
            type: "boolean",
            description: "Force deletion even if bucket contains memories (default: false)"
          }
        },
        required: ["bucket_name"]
      }
    },
    {
  • MCP CallTool request handler case for delete_bucket: extracts and validates parameters, invokes MemoryBoxClient.deleteBucket, returns formatted success response.
    case "delete_bucket": {
      const bucketName = String(request.params.arguments?.bucket_name || "");
      const force = Boolean(request.params.arguments?.force || false);
    
      if (!bucketName) {
        throw new McpError(ErrorCode.InvalidParams, "Bucket name is required");
      }
    
      // Delete the bucket
      const result = await memoryBoxClient.deleteBucket(bucketName, force);
    
      return {
        content: [{
          type: "text",
          text: `Bucket "${bucketName}" deleted successfully!\n\n${result.message || "The bucket has been removed."}`
        }]
      };
    }
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 default behavior (deleting empty buckets) and the effect of the 'force' parameter (deleting with content), which are useful. However, it lacks details on permissions, reversibility, error handling, or response format, leaving gaps for a mutation tool.

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 front-loads the core action and immediately clarifies the default and optional behaviors. Every word earns its place, with no redundancy or unnecessary elaboration, making it highly concise and well-structured.

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 complexity as a destructive operation with no annotations or output schema, the description is somewhat complete by covering the default and forced deletion behaviors. However, it lacks critical details like permissions, confirmation prompts, or error cases, which are important for safe usage, making it only adequate.

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%, so the schema already documents both parameters thoroughly. The description adds minimal value by implying the 'force' parameter's effect but does not provide additional syntax or format details beyond what the schema states, meeting the baseline for high schema coverage.

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?

The description clearly states the specific action ('Delete') and resource ('a bucket'), distinguishing it from sibling tools like 'create_bucket' or 'get_buckets'. It also specifies the default behavior ('empty by default') and an optional capability ('use force to delete with content'), making the purpose explicit and differentiated.

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?

The description provides clear context on when to use the 'force' parameter (to delete a bucket with content) versus the default (empty bucket), which helps guide usage. However, it does not explicitly mention when to use this tool versus alternatives like 'delete_memory' or warn about prerequisites, such as checking bucket emptiness first, which prevents a perfect score.

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