Skip to main content
Glama

w3_space_add

Add, manage, and verify storage spaces on the IPFS network by providing UCAN proof or base64 identity CID strings via the MCP server.

Instructions

Tool for w3_space_add operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proofYesFilesystem path to a CAR encoded UCAN proof, or a base64 identity CID string.

Implementation Reference

  • The handler function that implements the core logic for the 'w3_space_add' tool. It validates input arguments using the schema, executes the 'w3 space add' command with the provided proof, and returns the stdout output wrapped in a standardized MCP response.
    const handleW3SpaceAdd: ToolHandler = async (args) => {
      const parsed = Schemas.W3SpaceAddArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_space_add: ${parsed.error.message}`
        );
      const { proof } = parsed.data;
      const { stdout } = await runW3Command(`space add "${proof}"`);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              message: "Space added successfully from proof.",
              output: stdout.trim(),
            }),
          },
        ],
      };
    };
  • Zod schema defining the input arguments for the 'w3_space_add' tool, specifically requiring a 'proof' string which is a path to a CAR-encoded UCAN proof or a base64 identity CID.
    export const W3SpaceAddArgsSchema = z.object({
      proof: z
        .string()
        .describe(
          "Filesystem path to a CAR encoded UCAN proof, or a base64 identity CID string."
        ),
    });
  • Registration of the 'w3_space_add' handler in the toolHandlers map, which is used by the MCP server in index.ts to route CallTool requests to the appropriate handler.
    w3_space_add: handleW3SpaceAdd,
Behavior1/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 but offers none. It doesn't indicate whether this is a read or write operation, what permissions are required, whether it's destructive, what happens on success/failure, or any rate limits. The single sentence provides zero 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.

Conciseness2/5

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

While technically concise with only one sentence, this is a case of under-specification rather than effective conciseness. The single sentence 'Tool for w3_space_add operation' doesn't earn its place by providing any useful information beyond what's already in the tool name, making it inefficient despite its brevity.

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?

Given no annotations, no output schema, and a completely inadequate description, this tool definition is severely incomplete. The description fails to explain what the tool does, when to use it, what behavior to expect, or how it differs from sibling space-related tools, leaving the agent with insufficient information to properly invoke it.

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 single parameter 'proof' well-documented in the schema as 'Filesystem path to a CAR encoded UCAN proof, or a base64 identity CID string.' The description adds no additional parameter information beyond what the schema already provides, which meets the baseline expectation when schema coverage is high.

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_space_add operation' is a tautology that merely restates the tool name without explaining what the operation does. It doesn't specify what resource is being added to what space or what the verb 'add' actually accomplishes, making the purpose vague and unhelpful for agent selection.

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 absolutely no guidance on when to use this tool versus alternatives. Given the sibling tools include 'w3_space_create', 'w3_space_ls', and 'w3_space_info', there's no indication of how this 'add' operation differs from creating or provisioning a space, leaving the agent with no contextual usage information.

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