Skip to main content
Glama

affine_cleanup_blobs

Permanently remove deleted blobs in AFFiNE workspaces to optimize storage. Requires a workspace ID to target specific cleanup tasks.

Instructions

Permanently remove deleted blobs to free up storage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID

Implementation Reference

  • The async handler function that executes the tool logic: performs a GraphQL mutation to permanently release deleted blobs in the specified workspace, freeing up storage. Returns success status and count of released blobs or error.
    const cleanupBlobsHandler = async ({ workspaceId }: { workspaceId: string }) => { try { const mutation = ` mutation ReleaseDeletedBlobs($workspaceId: String!) { releaseDeletedBlobs(workspaceId: $workspaceId) } `; const data = await gql.request<{ releaseDeletedBlobs: number }>(mutation, { workspaceId }); return text({ success: true, workspaceId, blobsReleased: data.releaseDeletedBlobs }); } catch (error: any) { return text({ error: error.message }); } };
  • Registration of the 'affine_cleanup_blobs' MCP tool, including input schema validation using Zod and linking to the handler function.
    server.registerTool( "affine_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/index.ts:73-73 (registration)
    Top-level invocation of the registerBlobTools function during server setup, which registers the affine_cleanup_blobs tool among others.
    registerBlobTools(server, gql);

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