w3_can_upload_rm
Removes an upload listing by its root CID from the MCP IPFS server without deleting the associated blobs or shards, enabling advanced data management.
Instructions
Removes an upload listing by its root CID (advanced use). Does not remove the underlying blobs/shards.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rootCid | Yes | Root CID of the upload to remove from the list. |
Implementation Reference
- src/tool_handlers.ts:647-666 (handler)The handler function that executes the tool logic: parses args with W3CanUploadRmArgsSchema, runs 'can upload rm {rootCid}' command, returns formatted response with stdout.const handleW3CanUploadRm: ToolHandler = async (args) => { const parsed = Schemas.W3CanUploadRmArgsSchema.safeParse(args); if (!parsed.success) throw new Error( `Invalid arguments for w3_can_upload_rm: ${parsed.error.message}` ); const { rootCid } = parsed.data; const { stdout } = await runW3Command(`can upload rm ${rootCid}`); return { content: [ { type: "text", text: JSON.stringify({ message: `Upload ${rootCid} removed successfully.`, output: stdout.trim(), }), }, ], }; };
- src/schemas.ts:277-285 (schema)Zod schema defining the input arguments for the w3_can_upload_rm tool: requires rootCid string.export const W3CanUploadRmArgsSchema = z .object({ rootCid: z .string() .describe("Root CID of the upload to remove from the list."), }) .describe( "Removes an upload listing by its root CID (advanced use). Does not remove the underlying blobs/shards." );
- src/tool_handlers.ts:968-968 (registration)Registration of the tool handler in the toolHandlers map.w3_can_upload_rm: handleW3CanUploadRm,