Skip to main content
Glama

upload

Update Chrome Web Store extension drafts by uploading ZIP files. This tool processes existing item updates through automated file submission.

Instructions

Upload a ZIP file to update an existing Chrome Web Store item draft. Note: Creating new items via API is not supported in v2 — use the Developer Dashboard to create new items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zipPathYesAbsolute path to the ZIP file to upload
itemIdNoExtension item ID (defaults to CWS_ITEM_ID env var)
publisherIdNoPublisher ID (defaults to CWS_PUBLISHER_ID env var or 'me')

Implementation Reference

  • The "upload" tool handler. It resolves the item/publisher IDs, reads the ZIP file, and performs a POST request to the Google Chrome Web Store upload API.
    server.tool(
      "upload",
      "Upload a ZIP file to update an existing Chrome Web Store item draft. Note: Creating new items via API is not supported in v2 — use the Developer Dashboard to create new items.",
      {
        zipPath: z.string().describe("Absolute path to the ZIP file to upload"),
        itemId: z
          .string()
          .optional()
          .describe("Extension item ID (defaults to CWS_ITEM_ID env var)"),
        publisherId: z
          .string()
          .optional()
          .describe("Publisher ID (defaults to CWS_PUBLISHER_ID env var or 'me')"),
      },
      async ({ zipPath, itemId, publisherId }) => {
        try {
          const id = resolveItemId(itemId);
          const pub = resolvePublisherId(publisherId);
          const zipData = readFileSync(zipPath);
    
          const url = `${UPLOAD_BASE}/publishers/${pub}/items/${id}:upload`;
    
          const result = await apiCall(url, {
            method: "POST",
            headers: { "Content-Type": "application/zip" },
            body: zipData,
          });
    
          return formatResponse(result);
        } catch (e: any) {
          return {
            content: [{ type: "text" as const, text: `Error: ${e.message}` }],
            isError: true,
          };
        }
      },
    );
Behavior3/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 discloses that this is a mutation operation ('update'), implies it requires an existing item draft, and mentions API version constraints ('not supported in v2'), which adds useful context. However, it lacks details on permissions, rate limits, or error behaviors that would be helpful for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is two sentences with zero waste: the first states the core purpose, and the second provides critical usage guidance. It is front-loaded with the main action and efficiently covers key constraints without unnecessary elaboration.

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

Completeness4/5

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

Given the mutation nature, lack of annotations, and no output schema, the description does well by clarifying the tool's purpose, usage boundaries, and API limitations. However, it could be more complete by mentioning authentication needs or typical response patterns, which are relevant for a write operation.

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 already documents all three parameters thoroughly. The description does not add any parameter-specific semantics beyond what the schema provides (e.g., it doesn't explain ZIP file format requirements or item ID sourcing). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('upload a ZIP file') and target resource ('update an existing Chrome Web Store item draft'), distinguishing it from siblings like 'update-metadata' or 'publish'. It also explicitly notes what it does NOT do ('Creating new items via API is not supported'), which helps differentiate its scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('to update an existing Chrome Web Store item draft') and when not to use it ('Creating new items via API is not supported — use the Developer Dashboard to create new items'). This clearly distinguishes it from alternative methods for item creation.

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

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/mikusnuz/cws-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server