Skip to main content
Glama

publish

Publish Chrome Web Store extensions with options for immediate release, staged rollouts, or skipping review when eligible.

Instructions

Publish an extension to Chrome Web Store. Supports immediate publish, staged publish, initial deploy percentage, and skip-review.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdNoExtension item ID (defaults to CWS_ITEM_ID env var)
publisherIdNoPublisher ID (defaults to CWS_PUBLISHER_ID env var or 'me')
publishTypeNoDEFAULT_PUBLISH: publishes immediately after approval. STAGED_PUBLISH: stages for manual publishing after approval. Defaults to DEFAULT_PUBLISH.
deployPercentageNoInitial deploy percentage for staged rollout (0-100). Only used with STAGED_PUBLISH or DEFAULT_PUBLISH.
skipReviewNoAttempt to skip review if the extension qualifies. Defaults to false.

Implementation Reference

  • The 'publish' tool implementation handles Chrome Web Store extension publishing by calling the Google API. It parses parameters, prepares the JSON payload for publish settings, and executes the API call.
    server.tool(
      "publish",
      "Publish an extension to Chrome Web Store. Supports immediate publish, staged publish, initial deploy percentage, and skip-review.",
      {
        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')"),
        publishType: z
          .enum(["DEFAULT_PUBLISH", "STAGED_PUBLISH"])
          .optional()
          .describe(
            "DEFAULT_PUBLISH: publishes immediately after approval. STAGED_PUBLISH: stages for manual publishing after approval. Defaults to DEFAULT_PUBLISH."
          ),
        deployPercentage: z
          .number()
          .int()
          .min(0)
          .max(100)
          .optional()
          .describe("Initial deploy percentage for staged rollout (0-100). Only used with STAGED_PUBLISH or DEFAULT_PUBLISH."),
        skipReview: z
          .boolean()
          .optional()
          .describe("Attempt to skip review if the extension qualifies. Defaults to false."),
      },
      async ({ itemId, publisherId, publishType, deployPercentage, skipReview }) => {
        try {
          const id = resolveItemId(itemId);
          const pub = resolvePublisherId(publisherId);
    
          const url = `${API_BASE}/v2/publishers/${pub}/items/${id}:publish`;
    
          const body: Record<string, unknown> = {};
          if (publishType) body.publishType = publishType;
          if (deployPercentage !== undefined) {
            body.deployInfos = [{ deployPercentage }];
          }
          if (skipReview !== undefined) body.skipReview = skipReview;
    
          const hasBody = Object.keys(body).length > 0;
    
          const result = await apiCall(url, {
            method: "POST",
            ...(hasBody
              ? {
                  headers: { "Content-Type": "application/json" },
                  body: JSON.stringify(body),
                }
              : {}),
          });
    
          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