deploy-percentage
Set the published deploy percentage for staged rollout on Chrome Web Store. Increase the target percentage for extensions with 10,000+ seven-day active users.
Instructions
Set the published deploy percentage for staged rollout on Chrome Web Store. The new percentage must be higher than the current target. Only available for items with 10,000+ seven-day active users.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| percentage | Yes | Deploy percentage (0-100). Must be larger than the current target percentage. | |
| itemId | No | Extension item ID (defaults to CWS_ITEM_ID env var) | |
| publisherId | No | Publisher ID (defaults to CWS_PUBLISHER_ID env var or 'me') |
Implementation Reference
- src/index.ts:407-445 (handler)The handler implementation for the "deploy-percentage" tool which makes a POST request to the Chrome Web Store API to update the deploy percentage.
server.tool( "deploy-percentage", "Set the published deploy percentage for staged rollout on Chrome Web Store. The new percentage must be higher than the current target. Only available for items with 10,000+ seven-day active users.", { percentage: z .number() .min(0) .max(100) .describe("Deploy percentage (0-100). Must be larger than the current target percentage."), 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 ({ percentage, itemId, publisherId }) => { try { const id = resolveItemId(itemId); const pub = resolvePublisherId(publisherId); const url = `${API_BASE}/v2/publishers/${pub}/items/${id}:setPublishedDeployPercentage`; const result = await apiCall(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ deployPercentage: percentage }), }); return formatResponse(result); } catch (e: any) { return { content: [{ type: "text" as const, text: `Error: ${e.message}` }], isError: true, }; } }, );