collection_fields_update
Modify field properties in Webflow CMS collections to update requirements, display names, or help text for improved content management.
Instructions
Update properties of an existing field in a CMS collection.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | Unique identifier for the Collection. | |
| field_id | Yes | Unique identifier for the Field. | |
| request | Yes | Request schema to update collection field metadata. |
Implementation Reference
- src/tools/cms.ts:199-211 (handler)The handler function that executes the tool logic by calling the Webflow API to update a specific field in a collection and handles the response or error.async ({ collection_id, field_id, request }) => { try { const response = await getClient().collections.fields.update( collection_id, field_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } }
- Zod schema defining the request body for updating collection field metadata (isRequired, displayName, helpText). Used in the tool's inputSchema.export const WebflowCollectionsFieldUpdateSchema = z .object({ isRequired: z .boolean() .optional() .describe("Indicates if the field is required in a collection."), displayName: z.string().optional().describe("Name of the field."), helpText: z.string().optional().describe("Help text for the field."), }) .describe("Request schema to update collection field metadata.");
- src/tools/cms.ts:185-212 (registration)MCP tool registration for 'collection_fields_update', including name, title, description, composed inputSchema (with collection_id, field_id, and WebflowCollectionsFieldUpdateSchema), and inline handler.server.registerTool( "collection_fields_update", { title: "Update Collection Field", description: "Update properties of an existing field in a CMS collection.", inputSchema: z.object({ collection_id: z .string() .describe("Unique identifier for the Collection."), field_id: z.string().describe("Unique identifier for the Field."), request: WebflowCollectionsFieldUpdateSchema, }), }, async ({ collection_id, field_id, request }) => { try { const response = await getClient().collections.fields.update( collection_id, field_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );