Skip to main content
Glama

w3_open

Access content stored in IPFS using its CID and optional path, enabling direct retrieval and navigation within the mcp-ipfs server's network.

Instructions

Tool for w3_open operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesThe CID of the content to open.
pathNoOptional path within the content to append to the URL.

Implementation Reference

  • The main handler function for the 'w3_open' tool. It validates input arguments using W3OpenArgsSchema, constructs a gateway URL (https://w3s.link/ipfs/{cid}/{path?}), and returns a text content block with the URL for the user to open in their browser.
    const handleW3Open: ToolHandler = async (args) => {
      const parsed = Schemas.W3OpenArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(`Invalid arguments for w3_open: ${parsed.error.message}`);
      const { cid, path } = parsed.data;
      const baseUrl = "https://w3s.link/ipfs/";
      const fullPath = path ? `${cid}/${path}` : cid;
      const url = `${baseUrl}${fullPath}`;
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              message: `To view the content, open this URL in your browser: ${url}`,
              url: url,
            }),
          },
        ],
      };
    };
  • Zod schema defining the input parameters for the 'w3_open' tool: 'cid' (string, required), 'path' (string, optional).
    export const W3OpenArgsSchema = z.object({
      cid: z.string().describe("The CID of the content to open."),
      path: z
        .string()
        .optional()
        .describe("Optional path within the content to append to the URL."),
    });
  • Maps the tool name 'w3_open' to its handler function 'handleW3Open' in the toolHandlers object exported from tool_handlers.ts, which is imported and used by the MCP server in index.ts to dispatch tool calls dynamically.
    w3_open: handleW3Open,
Behavior1/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. The description reveals nothing about what the tool actually does behaviorally - whether it's a read operation, creates something, modifies state, requires authentication, has rate limits, or what format the output takes. 'open' could mean anything from displaying content to initiating a session.

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

Conciseness2/5

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

While technically concise with just 5 words, this is under-specification rather than effective conciseness. The description fails to communicate essential information about the tool's purpose. Every sentence should earn its place, but this single sentence provides almost no value beyond the tool name itself.

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

Completeness1/5

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

For a tool with 2 parameters, no annotations, and no output schema, the description is completely inadequate. It doesn't explain what the tool does, when to use it, what behavior to expect, or what the output might contain. Given the complexity implied by the sibling tools (which include operations for content management, authentication, and storage), this description leaves the agent with insufficient information to use the tool effectively.

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%, with both parameters (cid and path) clearly documented in the 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.

Purpose1/5

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

The description 'Tool for w3_open operation' is a tautology that merely restates the tool name without explaining what the operation does. It provides no specific verb or resource, and doesn't distinguish this from sibling tools like w3_ls or w3_rm. The description fails to convey what 'open' means in this context.

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 provides no guidance on when to use this tool versus alternatives. With sibling tools like w3_ls (list), w3_rm (remove), and w3_up (upload), there's no indication of when 'open' is appropriate versus these other operations. No context, prerequisites, or exclusions are mentioned.

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