Skip to main content
Glama

w3_can_store_ls

Lists stored CAR files (shards) within the current space using pagination and JSON output for advanced data management on MCP-IPFS servers.

Instructions

Lists stored CAR files (shards) in the current space (advanced use).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoOpaque cursor string from a previous response for pagination.
jsonNoFormat output as newline delimited JSON (default: true).
sizeNoDesired number of results to return.

Implementation Reference

  • The main handler function for the 'w3_can_store_ls' tool. Parses input arguments, constructs the 'can store ls' CLI command with optional --json, --size, --cursor flags, executes it via runW3Command, processes output (parsing NDJSON if json flag), and returns structured content.
    const handleW3CanStoreLs: ToolHandler = async (args) => {
      const parsed = Schemas.W3CanStoreLsArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_can_store_ls: ${parsed.error.message}`
        );
      const { json, size, cursor } = parsed.data;
      let command = "can store ls";
      if (json) command += " --json";
      if (size) command += ` --size ${size}`;
      if (cursor) command += ` --cursor ${cursor}`;
      const { stdout } = await runW3Command(command);
      if (json) {
        const stores = parseNdJson(stdout);
        return {
          content: [{ type: "text", text: JSON.stringify({ stores }) }],
        };
      } else {
        return {
          content: [
            { type: "text", text: JSON.stringify({ output: stdout.trim() }) },
          ],
        };
      }
    };
  • Zod schema defining input arguments for the w3_can_store_ls tool: optional json (default true), size (positive int), cursor (string).
    export const W3CanStoreLsArgsSchema = z
      .object({
        json: z
          .boolean()
          .optional()
          .default(true)
          .describe("Format output as newline delimited JSON (default: true)."),
        size: z
          .number()
          .int()
          .positive()
          .optional()
          .describe("Desired number of results to return."),
        cursor: z
          .string()
          .optional()
          .describe(
            "Opaque cursor string from a previous response for pagination."
          ),
      })
      .describe(
        "Lists stored CAR files (shards) in the current space (advanced use)."
      );
  • Registration of the handleW3CanStoreLs function to the 'w3_can_store_ls' key in the toolHandlers export map.
    w3_can_store_ls: handleW3CanStoreLs,
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' but lacks details on permissions, rate limits, pagination behavior (implied by cursor param), or output format beyond JSON option. This leaves significant behavioral gaps for a listing tool.

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 a single, efficient sentence that states the core purpose without fluff. It could be slightly more front-loaded with key details, but it's appropriately sized and wastes no words.

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

Completeness3/5

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

Given no annotations and no output schema, the description is minimal but covers the basic action. It lacks details on output format, error handling, or advanced usage implications, making it adequate but incomplete for a tool with three parameters and no structured behavioral hints.

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 fully documents parameters (cursor, json, size). The description adds no additional parameter meaning beyond what's in the schema, meeting the baseline of 3 for high coverage without extra value.

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 action ('Lists') and resource ('stored CAR files (shards)') with context ('in the current space'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like w3_can_blob_ls or w3_can_upload_ls, which also list resources, missing full sibling distinction.

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 with 'advanced use', implying a specific context but not explaining when to use this tool versus alternatives like w3_can_blob_ls or w3_can_upload_ls. No explicit when/when-not rules or prerequisites are stated, leaving usage unclear.

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