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,

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