collections_items_publish_items
Publish draft items in a Webflow CMS collection to make them live on your website. Use this tool to update content from draft to published status.
Instructions
Publish draft items in a CMS collection to make them live.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | Unique identifier for the Collection. | |
| itemIds | Yes | Array of item IDs to be published. |
Implementation Reference
- src/tools/cms.ts:407-420 (handler)Handler function that executes the tool logic: publishes specified items in a CMS collection to live using the WebflowClient'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:393-421 (registration)Registration of the 'collections_items_publish_items' MCP tool, including title, description, input schema, and inline handler.server.registerTool( "collections_items_publish_items", { title: "Publish Collection Items", description: "Publish draft items in a CMS collection to make them live.", inputSchema: z.object({ 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); } } );
- src/tools/cms.ts:398-405 (schema)Zod input schema defining parameters: collection_id (string) and itemIds (array of strings).inputSchema: z.object({ collection_id: z .string() .describe("Unique identifier for the Collection."), itemIds: z .array(z.string()) .describe("Array of item IDs to be published."), }),