Skip to main content
Glama

cancel

Cancel a pending Chrome Web Store submission currently in review. Use this to stop an extension upload or update before it is published.

Instructions

Cancel a pending submission on Chrome Web Store. Can be used to cancel an item currently in 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')

Implementation Reference

  • src/index.ts:378-407 (registration)
    The 'cancel' tool is registered on the MCP server at lines 378-407. It accepts optional itemId and publisherId, resolves them, POSTs to the Chrome Web Store v2 API cancelSubmission endpoint, and formats the response.
    server.tool(
      "cancel",
      "Cancel a pending submission on Chrome Web Store. Can be used to cancel an item currently in 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')"),
      },
      async ({ itemId, publisherId }) => {
        try {
          const id = resolveItemId(itemId);
          const pub = resolvePublisherId(publisherId);
    
          const url = `${API_BASE}/v2/publishers/${pub}/items/${id}:cancelSubmission`;
          const result = await apiCall(url, { method: "POST" });
    
          return formatResponse(result);
        } catch (e: any) {
          return {
            content: [{ type: "text" as const, text: `Error: ${e.message}` }],
            isError: true,
          };
        }
      },
    );
  • The handler function for the 'cancel' tool. It resolves item/publisher IDs, makes a POST request to the Chrome Web Store cancelSubmission API, and returns the result or an error.
    async ({ itemId, publisherId }) => {
      try {
        const id = resolveItemId(itemId);
        const pub = resolvePublisherId(publisherId);
    
        const url = `${API_BASE}/v2/publishers/${pub}/items/${id}:cancelSubmission`;
        const result = await apiCall(url, { method: "POST" });
    
        return formatResponse(result);
      } catch (e: any) {
        return {
          content: [{ type: "text" as const, text: `Error: ${e.message}` }],
          isError: true,
        };
      }
    },
  • Zod schema for the 'cancel' tool: optional itemId and publisherId strings.
    {
      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')"),
    },
  • Helper that resolves an optional itemId to a default from env var CWS_ITEM_ID, or throws.
    function resolveItemId(itemId?: string): string {
      const id = itemId || DEFAULT_ITEM_ID;
      if (!id) {
        throw new Error(
          "No item ID provided. Pass itemId parameter or set CWS_ITEM_ID env var.",
        );
      }
      return id;
    }
  • Helper that resolves an optional publisherId to a default from env var CWS_PUBLISHER_ID or 'me'.
    function resolvePublisherId(publisherId?: string): string {
      return publisherId || PUBLISHER_ID;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It explains the action (cancel a pending submission) but does not disclose side effects, permissions needed, or post-cancellation state. This is adequate but lacks depth.

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?

Two sentences, no filler. Every word is necessary and front-loaded with the core verb and resource. Very efficient.

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

Completeness3/5

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

For a simple tool with two optional parameters and no output schema, the description covers the core purpose but omits prerequisites (e.g., item must be pending), return value, or what happens after cancellation. Adequate but not thorough.

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 coverage is 100% with descriptions for both parameters. The tool description adds no extra meaning beyond the schema, so baseline 3 applies.

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 verb 'Cancel' and the resource 'pending submission on Chrome Web Store'. It specifies the tool targets items in review, distinguishing it from sibling tools like publish, upload, or get.

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

Usage Guidelines4/5

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

The description provides context for when to use the tool ('to cancel an item currently in review'), but does not explicitly state when not to use it or mention alternatives. However, the context is clear enough against sibling tools.

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