Skip to main content
Glama

w3_can_store_rm

Remove a stored CAR shard by its CID from the mcp-ipfs server permanently. Exercise caution as this action deletes the underlying data shard.

Instructions

Removes a stored CAR shard by its CID (advanced use). Use with extreme caution, as this deletes the underlying data shard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
carCidYesCID of the CAR shard to remove from the store.

Implementation Reference

  • The main handler function for the w3_can_store_rm tool. It validates input arguments using Zod schema, executes the 'w3 can store rm' command with the provided carCid, and returns a formatted response with the command output.
    const handleW3CanStoreRm: ToolHandler = async (args) => {
      const parsed = Schemas.W3CanStoreRmArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_can_store_rm: ${parsed.error.message}`
        );
      const { carCid } = parsed.data;
      const { stdout } = await runW3Command(`can store rm ${carCid}`);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              message: `Successfully removed CAR shard ${carCid}.`,
              output: stdout.trim(),
            }),
          },
        ],
      };
  • Zod schema defining the input arguments for the w3_can_store_rm tool, which requires a single 'carCid' string parameter.
    export const W3CanStoreRmArgsSchema = z
      .object({
        carCid: z
          .string()
          .describe("CID of the CAR shard to remove from the store."),
      })
      .describe(
        "Removes a stored CAR shard by its CID (advanced use). Use with extreme caution, as this deletes the underlying data shard."
      );
  • The toolHandlers object maps the tool name 'w3_can_store_rm' to its handler function handleW3CanStoreRm, registering it for use in the MCP tools system.
    export const toolHandlers: Record<string, ToolHandler> = {
      w3_login: handleW3Login,
      w3_space_ls: handleW3SpaceLs,
      w3_space_use: handleW3SpaceUse,
      w3_space_create: handleW3SpaceCreate,
      w3_up: handleW3Up,
      w3_ls: handleW3Ls,
      w3_rm: handleW3Rm,
      w3_open: handleW3Open,
      w3_space_info: handleW3SpaceInfo,
      w3_space_add: handleW3SpaceAdd,
      w3_delegation_create: handleW3DelegationCreate,
      w3_delegation_ls: handleW3DelegationLs,
      w3_delegation_revoke: handleW3DelegationRevoke,
      w3_proof_add: handleW3ProofAdd,
      w3_proof_ls: handleW3ProofLs,
      w3_key_create: handleW3KeyCreate,
      w3_bridge_generate_tokens: handleW3BridgeGenerateTokens,
      w3_can_blob_add: handleW3CanBlobAdd,
      w3_can_blob_ls: handleW3CanBlobLs,
      w3_can_blob_rm: handleW3CanBlobRm,
      w3_can_index_add: handleW3CanIndexAdd,
      w3_can_upload_add: handleW3CanUploadAdd,
      w3_can_upload_ls: handleW3CanUploadLs,
      w3_can_upload_rm: handleW3CanUploadRm,
      w3_plan_get: handleW3PlanGet,
      w3_account_ls: handleW3AccountLs,
      w3_space_provision: handleW3SpaceProvision,
      w3_coupon_create: handleW3CouponCreate,
      w3_usage_report: handleW3UsageReport,
      w3_can_access_claim: handleW3CanAccessClaim,
      w3_can_store_add: handleW3CanStoreAdd,
      w3_can_store_ls: handleW3CanStoreLs,
      w3_can_store_rm: handleW3CanStoreRm,
      w3_can_filecoin_info: handleW3CanFilecoinInfo,
      w3_reset: handleW3Reset,
    };
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively discloses critical behavioral traits: it's a destructive operation ('deletes the underlying data shard'), has irreversible consequences, and is intended for advanced users. This goes beyond what minimal annotations would cover.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with two sentences that each earn their place: the first states the purpose, the second provides critical behavioral warnings. No wasted words, and the most important information (the destructive nature) is appropriately front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description does well by emphasizing the irreversible deletion. It could be more complete by mentioning what happens on success/failure or if there are prerequisites, but given the tool's single parameter and clear warning, it's reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the 'carCid' parameter thoroughly. The description doesn't add any additional parameter semantics beyond what's in the schema, maintaining the baseline score for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Removes') and resource ('stored CAR shard by its CID'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'w3_can_blob_rm' or 'w3_can_upload_rm', which also perform removal operations on different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context with 'advanced use' and 'Use with extreme caution', indicating when this tool should be used. It doesn't explicitly name alternatives or state when not to use it, but the cautionary language implies high-risk scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/alexbakers/mcp-ipfs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server