Skip to main content
Glama

w3_can_upload_ls

Retrieve detailed upload listings for the current space, including pagination and structured output options, using advanced JSON formatting.

Instructions

Lists uploads registered in the current space (advanced view, shows underlying structure).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoOpaque cursor string from a previous response for pagination.
jsonNoFormat output as newline delimited JSON (default: true).
preNoReturn the page of results preceding the cursor.
shardsNoPretty print with shards in output (ignored if --json is true).
sizeNoDesired number of results to return.

Implementation Reference

  • The main handler function that executes the tool logic: parses input arguments using the schema, constructs the 'w3 can upload ls' CLI command based on flags (json, shards, size, cursor, pre), runs it via runW3Command utility, parses output as NDJSON if json=true, and formats the response as MCP tool content.
    const handleW3CanUploadLs: ToolHandler = async (args) => {
      const parsed = Schemas.W3CanUploadLsArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_can_upload_ls: ${parsed.error.message}`
        );
      const { json, shards, size, cursor, pre } = parsed.data;
      let command = "can upload ls";
      if (json) command += " --json";
      if (shards) command += " --shards";
      if (size) command += ` --size ${size}`;
      if (cursor) command += ` --cursor ${cursor}`;
      if (pre) command += " --pre";
      const { stdout } = await runW3Command(command);
      if (json) {
        const uploads = parseNdJson(stdout);
        return {
          content: [{ type: "text", text: JSON.stringify({ uploads }) }],
        };
      } else {
        return {
          content: [
            { type: "text", text: JSON.stringify({ output: stdout.trim() }) },
          ],
        };
      }
    };
  • Zod schema defining the input parameters and validation for the w3_can_upload_ls tool, including options like json, shards, size, cursor, pre.
    export const W3CanUploadLsArgsSchema = z
      .object({
        json: z
          .boolean()
          .optional()
          .default(true)
          .describe("Format output as newline delimited JSON (default: true)."),
        shards: z
          .boolean()
          .optional()
          .default(false)
          .describe(
            "Pretty print with shards in output (ignored if --json is 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."
          ),
        pre: z
          .boolean()
          .optional()
          .default(false)
          .describe("Return the page of results preceding the cursor."),
      })
      .describe(
        "Lists uploads registered in the current space (advanced view, shows underlying structure)."
      );
  • Maps the tool name 'w3_can_upload_ls' to its handler function in the toolHandlers export, which is used by index.ts to dispatch CallTool requests.
    w3_can_upload_ls: handleW3CanUploadLs,
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 of behavioral disclosure. It mentions 'advanced view' and 'shows underlying structure,' hinting at detailed output, but fails to describe critical behaviors like pagination (implied by 'cursor' parameter), output format defaults (JSON vs. pretty print), or mutation effects (likely read-only based on 'ls' convention). For a tool with 5 parameters and no annotation coverage, this is inadequate.

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 front-loads the core purpose ('Lists uploads registered in the current space') and adds a clarifying note ('advanced view, shows underlying structure'). There is no wasted verbiage, though it could be slightly more structured by separating purpose from behavioral hints.

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

Completeness2/5

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

Given the tool's complexity (5 parameters, no output schema, no annotations), the description is incomplete. It lacks details on output structure, error conditions, pagination behavior, and how the 'advanced view' differs from standard listings. Without annotations or output schema, the agent must rely heavily on schema parameters, leaving gaps in understanding the tool's full behavior.

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 each parameter well-documented in the input schema (e.g., 'cursor' for pagination, 'json' for output format). The description adds no additional parameter semantics beyond what the schema provides, such as explaining interactions between 'json' and 'shards' or typical 'size' values. Baseline 3 is appropriate since the schema does the heavy lifting.

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 verb ('Lists') and resource ('uploads registered in the current space'), making the purpose evident. It distinguishes itself from generic listing tools by specifying 'uploads' rather than other resources like accounts or stores. However, it doesn't explicitly differentiate from sibling upload tools like 'w3_can_upload_add' or 'w3_can_upload_rm' beyond the 'ls' suffix.

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, mentioning an 'advanced view' that 'shows underlying structure,' which implies usage for detailed inspection rather than simple listing. However, it lacks explicit when-to-use criteria, prerequisites, or comparisons to alternatives like 'w3_can_blob_ls' or 'w3_ls,' leaving the agent to infer context from tool names alone.

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