w3_can_blob_rm
Remove a blob from the MCP-IPFS server store using its base58btc encoded multihash to efficiently manage storage and data operations.
Instructions
Removes a blob from the store by its base58btc encoded multihash.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| multihash | Yes | Base58btc encoded multihash of the blob to remove. |
Implementation Reference
- src/tool_handlers.ts:555-574 (handler)The handler function for 'w3_can_blob_rm' that validates input arguments using Zod schema, executes the w3 CLI command 'can blob rm <multihash>', and returns a structured response with success message and stdout.const handleW3CanBlobRm: ToolHandler = async (args) => { const parsed = Schemas.W3CanBlobRmArgsSchema.safeParse(args); if (!parsed.success) throw new Error( `Invalid arguments for w3_can_blob_rm: ${parsed.error.message}` ); const { multihash } = parsed.data; const { stdout } = await runW3Command(`can blob rm ${multihash}`); return { content: [ { type: "text", text: JSON.stringify({ message: `Blob ${multihash} removed successfully.`, output: stdout.trim(), }), }, ], }; };
- src/schemas.ts:215-223 (schema)Zod schema defining the input parameters for the w3_can_blob_rm tool: requires a 'multihash' string (Base58btc encoded multihash of the blob). Includes description for MCP tool metadata.export const W3CanBlobRmArgsSchema = z .object({ multihash: z .string() .describe("Base58btc encoded multihash of the blob to remove."), }) .describe( "Removes a blob from the store by its base58btc encoded multihash." );
- src/tool_handlers.ts:964-964 (registration)Registration of the 'w3_can_blob_rm' tool in the toolHandlers map, which is used by the MCP server to route CallTool requests to the appropriate handler.w3_can_blob_rm: handleW3CanBlobRm,