collections_items_publish_items
Publish selected items from a specified collection in Webflow to make them live on your site. Streamline content updates and ensure accurate data display.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | ||
| itemIds | Yes |
Implementation Reference
- src/tools/cms.ts:356-369 (handler)Handler function that publishes the specified CMS draft items to live by calling the Webflow API's publishItem method.async ({ collection_id, itemIds }) => { try { const response = await getClient().collections.items.publishItem( collection_id, { itemIds: itemIds, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } }
- src/tools/cms.ts:348-355 (schema)Input schema defined using Zod for the tool parameters: collection_id and itemIds.{ collection_id: z .string() .describe("Unique identifier for the Collection."), itemIds: z .array(z.string()) .describe("Array of item IDs to be published."), },
- src/tools/cms.ts:345-370 (registration)Registration of the 'collections_items_publish_items' tool with the MCP server inside the registerCmsTools function.server.tool( "collections_items_publish_items", "Publish draft items in a CMS collection to make them live.", { collection_id: z .string() .describe("Unique identifier for the Collection."), itemIds: z .array(z.string()) .describe("Array of item IDs to be published."), }, async ({ collection_id, itemIds }) => { try { const response = await getClient().collections.items.publishItem( collection_id, { itemIds: itemIds, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );