Skip to main content
Glama

w3_rm

Remove a specified Content Identifier (CID) and its associated shards from the uploads listing on the MCP IPFS server to manage storage efficiently.

Instructions

Tool for w3_rm operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesRoot Content CID (e.g., bafy...) to remove from the uploads listing.
removeShardsNoAlso remove underlying shards from the store (default: false). Use with caution.

Implementation Reference

  • Handler function that validates input using W3RmArgsSchema, constructs and executes the 'w3 rm' command, and returns the result as MCP content.
    const handleW3Rm: ToolHandler = async (args) => {
      const parsed = Schemas.W3RmArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(`Invalid arguments for w3_rm: ${parsed.error.message}`);
      const { cid, removeShards } = parsed.data;
      let command = `rm ${cid}`;
      if (removeShards) command += " --shards";
      const { stdout } = await runW3Command(command);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              message: `Successfully removed listing for CID ${cid}.`,
              output: stdout.trim(),
            }),
          },
        ],
      };
    };
  • Zod schema defining the input arguments for the w3_rm tool: required 'cid' string and optional 'removeShards' boolean.
    export const W3RmArgsSchema = z.object({
      cid: z
        .string()
        .describe(
          "Root Content CID (e.g., bafy...) to remove from the uploads listing."
        ),
      removeShards: z
        .boolean()
        .optional()
        .default(false)
        .describe(
          "Also remove underlying shards from the store (default: false). Use with caution."
        ),
    });
  • Registration of the w3_rm tool handler in the toolHandlers map used by the MCP server.
    w3_rm: handleW3Rm,
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It fails to indicate that this is a destructive operation (implied by 'rm' but not stated), doesn't mention permissions or authentication requirements, and provides no information about rate limits, side effects, or what happens to removed content. The description adds almost no behavioral context beyond the tool name.

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

Conciseness3/5

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

The description is extremely concise (4 words) but under-specified rather than efficiently informative. While it doesn't waste words, it fails to provide essential information that would help an agent understand and use the tool effectively. The single sentence doesn't earn its place by adding value.

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

Completeness2/5

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

For a destructive operation with no annotations and no output schema, the description is severely incomplete. It doesn't explain what 'w3_rm' actually does, what resource it operates on, what the consequences are, or what to expect as a result. The combination of a vague description with missing structural information creates significant gaps for agent understanding.

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?

With 100% schema description coverage, both parameters (cid and removeShards) are well-documented in the input schema. The description adds no additional parameter information beyond what's already in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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

Purpose2/5

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

The description 'Tool for w3_rm operation' is a tautology that merely restates the tool name without specifying what the operation does. It doesn't identify the verb (remove/delete) or resource (uploads listing, content), nor does it differentiate from sibling tools like w3_can_upload_rm or w3_can_blob_rm. This provides minimal actionable information.

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

Usage Guidelines1/5

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

The description offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or exclusions. With sibling tools like w3_can_upload_rm and w3_can_blob_rm that also perform removal operations, the lack of differentiation is particularly problematic.

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