Skip to main content
Glama

w3_can_index_add

Adds a Content Identifier (CID) for indexing advanced data structures on the MCP IPFS server, enabling efficient data management and retrieval within storacha.network ecosystems.

Instructions

Registers an index CID with the service (advanced use). Please refer to storacha.network documentation for details on indices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesCID of the index to add.

Implementation Reference

  • The main handler function that parses input arguments using the schema, executes the 'can index add' w3 command with the provided CID, and returns a success message with the command output.
    const handleW3CanIndexAdd: ToolHandler = async (args) => {
      const parsed = Schemas.W3CanIndexAddArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_can_index_add: ${parsed.error.message}`
        );
      const { cid } = parsed.data;
      const { stdout } = await runW3Command(`can index add ${cid}`);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              message: `Index CID ${cid} added successfully.`,
              output: stdout.trim(),
            }),
          },
        ],
      };
    };
  • Zod schema defining the input arguments for the tool, requiring a 'cid' string parameter.
    export const W3CanIndexAddArgsSchema = z
      .object({
        cid: z.string().describe("CID of the index to add."),
      })
      .describe(
        "Registers an index CID with the service (advanced use). Please refer to storacha.network documentation for details on indices."
      );
  • Maps the tool name 'w3_can_index_add' to its handler function in the toolHandlers export, which is used by index.ts for routing tool calls.
    w3_can_index_add: handleW3CanIndexAdd,
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'advanced use' and refers to external docs, but does not disclose key behavioral traits such as whether this is a read/write operation, potential side effects, authentication needs, or rate limits. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness4/5

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

The description is brief and front-loaded with the core action, consisting of two sentences. However, the second sentence defers to external documentation, which slightly reduces self-contained clarity but maintains efficiency without unnecessary elaboration.

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?

Given the lack of annotations and output schema, and the description's reliance on external documentation, it is incomplete for an AI agent. The tool's complexity (implied by 'advanced use') is not adequately explained, leaving gaps in understanding how to use it effectively in context with sibling tools.

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?

The schema description coverage is 100%, with the parameter 'cid' documented as 'CID of the index to add.' The description adds no additional meaning beyond this, as it repeats the same phrasing. Given the high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate with extra insights.

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 states the specific action ('Registers an index CID') and resource ('with the service'), making the purpose clear. However, it does not explicitly differentiate from sibling tools like 'w3_can_blob_add' or 'w3_can_store_add', which also involve adding operations, leaving some ambiguity in sibling context.

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

Usage Guidelines2/5

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

The description provides minimal guidance by labeling it as 'advanced use' and referring to external documentation, but it does not specify when to use this tool versus alternatives (e.g., other 'add' tools in the sibling list) or any prerequisites. This lack of explicit context reduces its utility for an AI agent.

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