collections_items_update_items
Update existing items in Webflow CMS collections as drafts to modify content before publishing changes.
Instructions
Update existing items in a CMS collection as drafts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | Unique identifier for the Collection. | |
| request | Yes |
Implementation Reference
- src/tools/cms.ts:378-389 (handler)The inline handler function for the 'collections_items_update_items' tool. It calls the Webflow API's updateItems method to update collection items as drafts and formats the response or error.async ({ collection_id, request }) => { try { const response = await getClient().collections.items.updateItems( collection_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } }
- src/tools/cms.ts:367-390 (registration)Registers the 'collections_items_update_items' tool on the MCP server, specifying its title, description, input schema, and inline handler function."collections_items_update_items", { title: "Update Collection Items", description: "Update existing items in a CMS collection as drafts.", inputSchema: z.object({ collection_id: z .string() .describe("Unique identifier for the Collection."), request: WebflowCollectionsItemsUpdateItemsRequestSchema, }), }, async ({ collection_id, request }) => { try { const response = await getClient().collections.items.updateItems( collection_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );
- Zod schema defining the structure of the request body for updating collection items, consisting of an optional array of items each with an ID and field data.export const WebflowCollectionsItemsUpdateItemsRequestSchema = z.object({ items: z.array(CollectionItemWithIdInputSchema).optional(), });