Skip to main content
Glama

Cleanup Deleted Blobs

cleanup_blobs

Permanently delete unused blob files from a workspace to reclaim storage space.

Instructions

Permanently remove deleted blobs to free up storage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID

Implementation Reference

  • The cleanupBlobsHandler function that executes the 'cleanup_blobs' tool. It calls the 'releaseDeletedBlobs' GraphQL mutation to permanently remove deleted blobs and free up storage.
    const cleanupBlobsHandler = async ({ workspaceId }: { workspaceId: string }) => {
      try {
        const mutation = `
          mutation ReleaseDeletedBlobs($workspaceId: String!) {
            releaseDeletedBlobs(workspaceId: $workspaceId)
          }
        `;
        
        const data = await gql.request<{ releaseDeletedBlobs: boolean }>(mutation, {
          workspaceId
        });
        
        return text({ success: true, workspaceId, blobsReleased: data.releaseDeletedBlobs });
      } catch (error: any) {
        return text({ error: error.message });
      }
    };
  • Registration of the 'cleanup_blobs' tool using server.registerTool() with title 'Cleanup Deleted Blobs', input schema requiring workspaceId, and the cleanupBlobsHandler.
    server.registerTool(
      "cleanup_blobs",
      {
        title: "Cleanup Deleted Blobs",
        description: "Permanently remove deleted blobs to free up storage.",
        inputSchema: {
          workspaceId: z.string().describe("Workspace ID")
        }
      },
      cleanupBlobsHandler as any
    );
  • Input schema for 'cleanup_blobs': requires workspaceId (string). Defined inline in the registerTool call.
    {
      title: "Cleanup Deleted Blobs",
      description: "Permanently remove deleted blobs to free up storage.",
      inputSchema: {
        workspaceId: z.string().describe("Workspace ID")
      }
  • The tool name 'cleanup_blobs' is listed in the ALL_TOOLS array in toolSurface.ts, used for tool filtering and profiles.
    "cleanup_blobs",
  • Tool group classification for 'cleanup_blobs': assigned to groups ['blobs', 'blobs.write', 'cleanup', 'destructive', 'write'].
    cleanup_blobs: ["blobs", "blobs.write", "cleanup", "destructive", "write"],
Behavior2/5

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

No annotations provided, so description carries full burden. It discloses destructive nature ('permanently remove') but does not mention irreversibility, permission requirements, or potential cascading effects. For a cleanup action, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with no fluff. It could be slightly expanded to include key behavioral facts without losing conciseness, but currently it is appropriately short.

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?

Tool has one required parameter and no output schema. The description explains purpose and effect, but for a destructive operation, more context about implications (e.g., irreversibility, permissions) would make it complete. Adequate but not fully safe for an AI 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?

Schema coverage is 100%, so baseline is 3. The description does not add meaning beyond the parameter name and schema description; 'workspaceId' is self-explanatory but the description could clarify its role as scope for cleanup.

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 ('permanently remove') and the resource ('deleted blobs'), but 'deleted blobs' could be ambiguous (soft-deleted vs. something else). It distinguishes from sibling 'delete_blob' which presumably deletes a specific blob.

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?

No guidance on when to use this tool versus alternatives like 'delete_blob'. The description implies cleanup is for freeing storage, but does not explicitly state the context or prerequisites.

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

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/DAWNCR0W/affine-mcp-server'

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