collections_items_list_items
Retrieve and organize items from a Webflow CMS collection by specifying collection ID, sorting options, and pagination parameters for efficient data management.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmsLocaleId | No | ||
| collection_id | Yes | ||
| limit | No | ||
| name | No | ||
| offset | No | ||
| slug | No | ||
| sortBy | No | ||
| sortOrder | No |
Implementation Reference
- src/tools/cms.ts:267-296 (handler)The handler function that lists CMS collection items using the Webflow API, supporting pagination, filtering by name/slug, and sorting.async ({ collection_id, cmsLocaleId, offset, limit, name, slug, sortBy, sortOrder, }) => { try { const response = await getClient().collections.items.listItems( collection_id, { cmsLocaleId, offset, limit, name, slug, sortBy, sortOrder, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );
- src/tools/cms.ts:239-266 (schema)Input schema validation using Zod for tool parameters: collection_id, locale, limit, offset, name, slug, sortBy, sortOrder.{ collection_id: z .string() .describe("Unique identifier for the Collection."), cmsLocaleId: z .string() .optional() .describe("Unique identifier for the locale of the CMS Item."), limit: z .number() .optional() .describe("Maximum number of records to be returned (max limit: 100)"), offset: z .number() .optional() .describe( "Offset used for pagination if the results have more than limit records." ), name: z.string().optional().describe("Name of the field."), slug: z .string() .optional() .describe( "URL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug." ), sortBy: WebflowCollectionsItemsListItemsRequestSortBySchema, sortOrder: WebflowCollectionsItemsListItemsRequestSortOrderSchema, },
- src/tools/cms.ts:236-238 (registration)Registration of the tool with MCP server, specifying name and description.server.tool( "collections_items_list_items", "List items in a CMS collection with optional filtering and sorting.",
- Zod schema for the sortOrder parameter used in the tool's input schema.export const WebflowCollectionsItemsListItemsRequestSortOrderSchema = z .enum(["asc", "desc"]) .optional() .describe("Order to sort the items by. Allowed values: asc, desc.");