collections_items_create_item
Add new draft items to a Webflow CMS collection for content management and publishing workflows.
Instructions
Create new items in a CMS collection as drafts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | ||
| request | Yes |
Implementation Reference
- src/tools/cms.ts:351-362 (handler)The handler function that performs the actual work of creating a collection item by calling the Webflow API's createItem method.async ({ collection_id, request }) => { try { const response = await getClient().collections.items.createItem( collection_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } }
- src/tools/cms.ts:341-363 (registration)The server.registerTool call that registers the tool with its name, input schema, and handler function.server.registerTool( "collections_items_create_item", { title: "Create Collection Item", description: "Create new items in a CMS collection as drafts.", inputSchema: z.object({ collection_id: z.string(), request: WebflowCollectionsItemsCreateItemRequestSchema, }), }, async ({ collection_id, request }) => { try { const response = await getClient().collections.items.createItem( collection_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );
- Zod schema for the request payload used in the tool's inputSchema, defining the structure of items to create.export const WebflowCollectionsItemsCreateItemRequestSchema = z.object({ items: z.array(CollectionItemPostSingleSchema).optional(), });
- src/mcp.ts:49-49 (registration)Top-level call to registerCmsTools, which includes the registration of the collections_items_create_item tool among others.registerCmsTools(server, getClient);
- Related schema for the live version of the create item tool (collections_items_create_item_live). Note: Not the primary tool but closely related.export const WebflowCollectionsItemsCreateItemLiveRequestSchema = z.object({ items: z .array(