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,
          };
        }
      },
    );

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