Skip to main content
Glama

collections_items_create_item

Create and add new items to a specific collection in Webflow using the collection ID and item details, including field data, CMS locale, and publication status.

Input Schema

NameRequiredDescriptionDefault
collection_idYes
requestYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "collection_id": { "type": "string" }, "request": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "cmsLocaleId": { "type": "string" }, "createdOn": { "type": "string" }, "fieldData": { "allOf": [ { "additionalProperties": {}, "type": "object" }, { "properties": { "name": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "name", "slug" ], "type": "object" } ] }, "id": { "type": "string" }, "isArchived": { "type": "boolean" }, "isDraft": { "type": "boolean" }, "lastPublished": { "type": "string" }, "lastUpdated": { "type": "string" } }, "required": [ "fieldData" ], "type": "object" }, "type": "array" } }, "type": "object" } }, "required": [ "collection_id", "request" ], "type": "object" }

Implementation Reference

  • Registration of the 'collections_items_create_item' tool, including input schema reference and handler function.
    server.tool( "collections_items_create_item", "Create new items in a CMS collection as drafts.", { 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); } } );
  • The handler function that executes the tool logic by calling Webflow API to create CMS items.
    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 input schema defining the structure for creating CMS items (array of items).
    export const WebflowCollectionsItemsCreateItemRequestSchema = z.object({ items: z.array(CollectionItemPostSingleSchema).optional(), });

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