Skip to main content
Glama

w3_can_blob_ls

List and retrieve blobs stored in the current space with pagination support and JSON output format using the MCP IPFS server.

Instructions

Lists blobs stored in the current space.

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 handler function for 'w3_can_blob_ls' that validates input with schema, builds and runs the 'can blob ls' CLI command, processes output based on json flag, and returns structured response.
    const handleW3CanBlobLs: ToolHandler = async (args) => { const parsed = Schemas.W3CanBlobLsArgsSchema.safeParse(args); if (!parsed.success) throw new Error( `Invalid arguments for w3_can_blob_ls: ${parsed.error.message}` ); const { json, size, cursor } = parsed.data; let command = "can blob ls"; if (json) command += " --json"; if (size) command += ` --size ${size}`; if (cursor) command += ` --cursor ${cursor}`; const { stdout } = await runW3Command(command); if (json) { const blobs = parseNdJson(stdout); return { content: [{ type: "text", text: JSON.stringify({ blobs }) }], }; } else { return { content: [ { type: "text", text: JSON.stringify({ output: stdout.trim() }) }, ], }; } };
  • Zod schema for input validation of 'w3_can_blob_ls' tool arguments: optional json (default true), size, cursor.
    export const W3CanBlobLsArgsSchema = 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 blobs stored in the current space.");
  • Maps the tool name 'w3_can_blob_ls' to its handler function in the toolHandlers export.
    w3_can_blob_ls: handleW3CanBlobLs,

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