Skip to main content
Glama
webflow

Webflow

Official
by webflow

Create Option Field

collection_fields_create_option

Add a custom dropdown or selection field to a Webflow CMS collection with predefined choices, enabling structured content management through selectable options.

Instructions

Create a new option field in a CMS collection with predefined choices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYesUnique identifier for the Collection.
requestYes

Implementation Reference

  • Registration of the 'collection_fields_create_option' MCP tool, including title, description, input schema (referencing OptionFieldSchema), and inline handler function that calls the Webflow API to create an option field.
      "collection_fields_create_option",
      {
        title: "Create Option Field",
        description:
          "Create a new option field in a CMS collection with predefined choices.",
        inputSchema: z.object({
          collection_id: z
            .string()
            .describe("Unique identifier for the Collection."),
          request: OptionFieldSchema,
        }),
      },
      async ({ collection_id, request }) => {
        try {
          const response = await getClient().collections.fields.create(
            collection_id,
            request,
            requestOptions
          );
          return formatResponse(response);
        } catch (error) {
          return formatErrorResponse(error);
        }
      }
    );
  • The handler function for the tool, which invokes the Webflow collections.fields.create API with the provided collection_id and request body, formats the response or error.
    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 definition for the input 'request' parameter used in creating an option field, defining properties like type='Option', displayName, options array, etc.
    export const OptionFieldSchema = 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
        .literal("Option")
        .describe('Type of the field. Set this to "Option".'),
      displayName: z.string().describe("Name of the field."),
      helpText: z.string().optional().describe("Help text for the field."),
      metadata: z.object({
        options: z.array(
          z
            .object({
              name: z.string().describe("Name of the option."),
              id: z
                .string()
                .optional()
                .describe("Unique identifier for the option."),
            })
            .describe("Array of options for the field.")
        ),
      }),
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Create' implies a write/mutation operation, the description doesn't address permission requirements, whether this operation is reversible, what happens on failure, rate limits, or what the response looks like. For a creation tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core functionality, making it easy for an agent to quickly understand what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with 2 parameters (one being a complex nested object), no annotations, and no output schema, the description is insufficient. It doesn't explain what constitutes a valid 'option field', what happens after creation, error conditions, or provide examples. The agent lacks critical context needed to use this tool effectively beyond basic parameter passing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50%, with the 'collection_id' and 'request' parameters documented but their nested properties only partially described. The description adds minimal value beyond the schema by mentioning 'predefined choices' which hints at the 'options' metadata, but doesn't explain parameter relationships or provide additional context about how these parameters work together in practice.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create a new option field') and resource ('in a CMS collection with predefined choices'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'collection_fields_create_reference' or 'collection_fields_create_static' which likely create different field types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when this specific field type is appropriate, or how it differs from other field creation tools in the sibling list. The agent must infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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