status
Fetch the revision state, deploy percentage, version, and flags for a Chrome Web Store extension.
Instructions
Fetch the current status of an extension on Chrome Web Store. Returns published/submitted revision status, deploy percentage, version, takedown/warning flags, and last upload state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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:346-375 (registration)Main registration of the 'status' tool via server.tool(), with its schema definition and handler.
server.tool( "status", "Fetch the current status of an extension on Chrome Web Store. Returns published/submitted revision status, deploy percentage, version, takedown/warning flags, and last upload state.", { 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 ({ itemId, publisherId }) => { try { const id = resolveItemId(itemId); const pub = resolvePublisherId(publisherId); const url = `${API_BASE}/v2/publishers/${pub}/items/${id}:fetchStatus`; const result = await apiCall(url, { method: "GET" }); return formatResponse(result); } catch (e: any) { return { content: [{ type: "text" as const, text: `Error: ${e.message}` }], isError: true, }; } }, ); - src/index.ts:349-358 (schema)Zod schema for the 'status' tool inputs: itemId (optional string) and publisherId (optional string).
{ 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')"), }, - src/index.ts:359-374 (handler)Handler function for the 'status' tool that calls the Chrome Web Store API :fetchStatus endpoint and returns the formatted result.
async ({ itemId, publisherId }) => { try { const id = resolveItemId(itemId); const pub = resolvePublisherId(publisherId); const url = `${API_BASE}/v2/publishers/${pub}/items/${id}:fetchStatus`; const result = await apiCall(url, { method: "GET" }); return formatResponse(result); } catch (e: any) { return { content: [{ type: "text" as const, text: `Error: ${e.message}` }], isError: true, }; } }, - src/index.ts:364-364 (helper)The API URL built to call the :fetchStatus endpoint on the Chrome Web Store API v2.
const url = `${API_BASE}/v2/publishers/${pub}/items/${id}:fetchStatus`; - src/index.ts:365-365 (helper)apiCall helper invoked with GET method to fetch the extension status from the Chrome Web Store API.
const result = await apiCall(url, { method: "GET" });