Skip to main content
Glama

collection_fields_create_static

Add custom static fields like text, numbers, dates, or images to Webflow CMS collections to structure content with specific data types and requirements.

Instructions

Create a new static field in a CMS collection (e.g., text, number, date, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYesUnique identifier for the Collection.
requestYes

Implementation Reference

  • The handler function that executes the tool logic by calling the Webflow API to create a static field in a collection.
    async ({ collection_id, request }) => { try { const response = await getClient().collections.fields.create( collection_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); }
  • Registers the 'collection_fields_create_static' tool with the MCP server, defining its title, description, input schema, and handler.
    "collection_fields_create_static", { title: "Create Static Field", description: "Create a new static field in a CMS collection (e.g., text, number, date, etc.).", inputSchema: z.object({ collection_id: z .string() .describe("Unique identifier for the Collection."), request: StaticFieldSchema, }), }, async ({ collection_id, request }) => { try { const response = await getClient().collections.fields.create( collection_id, request, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );
  • Zod schema defining the input parameters for creating a static field (e.g., type, name, required status).
    export const StaticFieldSchema = z.object({ id: z.string().optional().describe("Unique identifier for the Field."), isEditable: z .boolean() .optional() .describe("Indicates if the field is editable."), isRequired: z .boolean() .optional() .describe("Indicates if the field is required."), type: z .union([ z.literal("Color"), z.literal("DateTime"), z.literal("Email"), z.literal("File"), z.literal("Image"), z.literal("Link"), z.literal("MultiImage"), z.literal("Number"), z.literal("Phone"), z.literal("PlainText"), z.literal("RichText"), z.literal("Switch"), z.literal("Video"), ]) .describe("Type of the field. Choose of these appropriate field types."), displayName: z.string().describe("Name of the field."), helpText: z.string().optional().describe("Help text for the field."), });
  • src/mcp.ts:49-49 (registration)
    Calls registerCmsTools within the main registerTools function, which registers all CMS tools including collection_fields_create_static.
    registerCmsTools(server, getClient);

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