Skip to main content
Glama

affine_delete_blob

Remove a specific blob/file from workspace storage by specifying the workspace ID and blob key/ID, with an option to delete permanently.

Instructions

Delete a blob/file from workspace storage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesBlob key/ID to delete
permanentlyNoDelete permanently
workspaceIdYesWorkspace ID

Implementation Reference

  • The asynchronous handler function `deleteBlobHandler` that executes the tool logic: sends a GraphQL mutation to delete a blob from the workspace storage using the provided workspaceId, key, and optional permanently flag.
    const deleteBlobHandler = async ({ workspaceId, key, permanently = false }: { workspaceId: string; key: string; permanently?: boolean }) => { try { const mutation = ` mutation DeleteBlob($workspaceId: String!, $key: String!, $permanently: Boolean) { deleteBlob(workspaceId: $workspaceId, key: $key, permanently: $permanently) } `; const data = await gql.request<{ deleteBlob: boolean }>(mutation, { workspaceId, key, permanently }); return text({ success: data.deleteBlob, key, workspaceId, permanently }); } catch (error: any) { return text({ error: error.message }); } };
  • Registration of the "affine_delete_blob" tool on the McpServer, specifying title, description, Zod-based input schema, and linking to the deleteBlobHandler.
    server.registerTool( "affine_delete_blob", { title: "Delete Blob", description: "Delete a blob/file from workspace storage.", inputSchema: { workspaceId: z.string().describe("Workspace ID"), key: z.string().describe("Blob key/ID to delete"), permanently: z.boolean().optional().describe("Delete permanently") } }, deleteBlobHandler as any );
  • Zod schema definition for the tool's input parameters: workspaceId (string), key (string), permanently (optional boolean).
    inputSchema: { workspaceId: z.string().describe("Workspace ID"), key: z.string().describe("Blob key/ID to delete"), permanently: z.boolean().optional().describe("Delete permanently") }

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