collections_create
Create a new CMS collection in Webflow by defining its name, singular name, and URL slug to organize and structure content on your site.
Instructions
Create a new CMS collection in a site with specified name and schema.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Unique identifier for the Site. | |
| request | Yes |
Implementation Reference
- src/tools/cms.ts:75-98 (registration)Registration of the 'collections_create' tool, including inline handler that executes the Webflow API call to create a new CMS collection and the input schema definition.server.registerTool( "collections_create", { title: "Create Collection", description: "Create a new CMS collection in a site with specified name and schema.", inputSchema: z.object({ site_id: z.string().describe("Unique identifier for the Site."), request: WebflowCollectionsCreateRequestSchema, }), }, async ({ site_id, request }) => { try { const response = await getClient().collections.create( site_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );
- Zod schema for the request body used in the 'collections_create' tool.export const WebflowCollectionsCreateRequestSchema = z.object({ displayName: z .string() .describe( "Name of the collection. Each collection must have a unique name within the site." ), singularName: z.string().describe("Singular name of the collection."), slug: z .string() .optional() .describe("Slug of the collection in the site URL structure. "), });