Skip to main content
Glama
webflow

Webflow

Official
by webflow

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
NameRequiredDescriptionDefault
collection_idYesUnique identifier for the Collection.
itemIdsYesArray of item IDs to be published.

Implementation Reference

  • 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);
      }
    }
  • 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);
        }
      }
    );
  • 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."),
    }),

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