Skip to main content
Glama
webflow

Webflow

Official
by webflow

collections_items_delete_item

Delete a specific item from a Webflow CMS collection by providing the collection ID and item ID. Optionally specify a locale ID to delete from non-primary locales.

Instructions

Delete an item in a CMS collection. Items will only be deleted in the primary locale unless a cmsLocaleId is included in the request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYesUnique identifier for the Collection.
itemIdYesItem ID to be deleted.
cmsLocaleIdsNoUnique identifier for the locale of the CMS Item.

Implementation Reference

  • Handler function that deletes a CMS collection item by calling the Webflow API's deleteItem method.
    async ({ collection_id, itemId, cmsLocaleIds }) => {
      try {
        const response = await getClient().collections.items.deleteItem(
          collection_id,
          itemId,
          { cmsLocaleId: cmsLocaleIds },
          requestOptions
        );
        return formatResponse(JSON.stringify("Item deleted"));
      } catch (error) {
        return formatErrorResponse(error);
      }
    }
  • Zod input schema defining parameters for the delete item tool: collection_id, itemId, and optional cmsLocaleIds.
    inputSchema: z.object({
      collection_id: z
        .string()
        .describe("Unique identifier for the Collection."),
      itemId: z.string().describe("Item ID to be deleted."),
      cmsLocaleIds: z
        .string()
        .optional()
        .describe("Unique identifier for the locale of the CMS Item."),
    }),
  • Tool registration call for 'collections_items_delete_item' including schema, description, and inline handler.
    server.registerTool(
      "collections_items_delete_item",
      {
        title: "Delete Collection Item",
        description:
          "Delete an item in a CMS collection. Items will only be deleted in the primary locale unless a cmsLocaleId is included in the request. ",
        inputSchema: z.object({
          collection_id: z
            .string()
            .describe("Unique identifier for the Collection."),
          itemId: z.string().describe("Item ID to be deleted."),
          cmsLocaleIds: z
            .string()
            .optional()
            .describe("Unique identifier for the locale of the CMS Item."),
        }),
      },
      async ({ collection_id, itemId, cmsLocaleIds }) => {
        try {
          const response = await getClient().collections.items.deleteItem(
            collection_id,
            itemId,
            { cmsLocaleId: cmsLocaleIds },
            requestOptions
          );
          return formatResponse(JSON.stringify("Item deleted"));
        } catch (error) {
          return formatErrorResponse(error);
        }
      }
    );

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/webflow/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server