Cleanup Deleted Blobs
cleanup_blobsPermanently delete unused blob files from a workspace to reclaim storage space.
Instructions
Permanently remove deleted blobs to free up storage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID |
Implementation Reference
- src/tools/blobStorage.ts:129-145 (handler)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 }); } }; - src/tools/blobStorage.ts:146-156 (registration)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 ); - src/tools/blobStorage.ts:148-153 (schema)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") } - src/toolSurface.ts:12-12 (registration)The tool name 'cleanup_blobs' is listed in the ALL_TOOLS array in toolSurface.ts, used for tool filtering and profiles.
"cleanup_blobs", - src/toolSurface.ts:102-102 (registration)Tool group classification for 'cleanup_blobs': assigned to groups ['blobs', 'blobs.write', 'cleanup', 'destructive', 'write'].
cleanup_blobs: ["blobs", "blobs.write", "cleanup", "destructive", "write"],